clang  15.0.0git
Sema.h
Go to the documentation of this file.
1 //===--- Sema.h - Semantic Analysis & AST Building --------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file defines the Sema class, which performs semantic analysis and
10 // builds ASTs.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_SEMA_SEMA_H
15 #define LLVM_CLANG_SEMA_SEMA_H
16 
17 #include "clang/AST/ASTConcept.h"
18 #include "clang/AST/ASTFwd.h"
19 #include "clang/AST/Attr.h"
20 #include "clang/AST/Availability.h"
22 #include "clang/AST/DeclTemplate.h"
24 #include "clang/AST/Expr.h"
25 #include "clang/AST/ExprCXX.h"
26 #include "clang/AST/ExprConcepts.h"
27 #include "clang/AST/ExprObjC.h"
28 #include "clang/AST/ExprOpenMP.h"
30 #include "clang/AST/LocInfoType.h"
32 #include "clang/AST/NSAPI.h"
34 #include "clang/AST/StmtCXX.h"
35 #include "clang/AST/StmtOpenMP.h"
36 #include "clang/AST/TypeLoc.h"
37 #include "clang/AST/TypeOrdering.h"
39 #include "clang/Basic/Builtins.h"
43 #include "clang/Basic/Module.h"
47 #include "clang/Basic/Specifiers.h"
49 #include "clang/Basic/TypeTraits.h"
51 #include "clang/Sema/CleanupInfo.h"
52 #include "clang/Sema/DeclSpec.h"
56 #include "clang/Sema/Ownership.h"
57 #include "clang/Sema/Scope.h"
58 #include "clang/Sema/SemaConcept.h"
60 #include "clang/Sema/Weak.h"
61 #include "llvm/ADT/ArrayRef.h"
62 #include "llvm/ADT/Optional.h"
63 #include "llvm/ADT/SetVector.h"
64 #include "llvm/ADT/SmallBitVector.h"
65 #include "llvm/ADT/SmallPtrSet.h"
66 #include "llvm/ADT/SmallSet.h"
67 #include "llvm/ADT/SmallVector.h"
68 #include "llvm/ADT/TinyPtrVector.h"
69 #include "llvm/Frontend/OpenMP/OMPConstants.h"
70 #include <deque>
71 #include <memory>
72 #include <string>
73 #include <tuple>
74 #include <vector>
75 
76 namespace llvm {
77  class APSInt;
78  template <typename ValueT, typename ValueInfoT> class DenseSet;
79  class SmallBitVector;
80  struct InlineAsmIdentifierInfo;
81 }
82 
83 namespace clang {
84  class ADLResult;
85  class ASTConsumer;
86  class ASTContext;
87  class ASTMutationListener;
88  class ASTReader;
89  class ASTWriter;
90  class ArrayType;
91  class ParsedAttr;
92  class BindingDecl;
93  class BlockDecl;
94  class CapturedDecl;
95  class CXXBasePath;
96  class CXXBasePaths;
97  class CXXBindTemporaryExpr;
99  class CXXConstructorDecl;
100  class CXXConversionDecl;
101  class CXXDeleteExpr;
102  class CXXDestructorDecl;
103  class CXXFieldCollector;
104  class CXXMemberCallExpr;
105  class CXXMethodDecl;
106  class CXXScopeSpec;
107  class CXXTemporary;
108  class CXXTryStmt;
109  class CallExpr;
110  class ClassTemplateDecl;
111  class ClassTemplatePartialSpecializationDecl;
112  class ClassTemplateSpecializationDecl;
113  class VarTemplatePartialSpecializationDecl;
114  class CodeCompleteConsumer;
115  class CodeCompletionAllocator;
116  class CodeCompletionTUInfo;
117  class CodeCompletionResult;
118  class CoroutineBodyStmt;
119  class Decl;
120  class DeclAccessPair;
121  class DeclContext;
122  class DeclRefExpr;
123  class DeclaratorDecl;
124  class DeducedTemplateArgument;
125  class DependentDiagnostic;
126  class DesignatedInitExpr;
127  class Designation;
128  class EnableIfAttr;
129  class EnumConstantDecl;
130  class Expr;
131  class ExtVectorType;
132  class FormatAttr;
133  class FriendDecl;
134  class FunctionDecl;
135  class FunctionProtoType;
136  class FunctionTemplateDecl;
137  class ImplicitConversionSequence;
139  class InitListExpr;
140  class InitializationKind;
141  class InitializationSequence;
142  class InitializedEntity;
143  class IntegerLiteral;
144  class LabelStmt;
145  class LambdaExpr;
146  class LangOptions;
147  class LocalInstantiationScope;
148  class LookupResult;
149  class MacroInfo;
151  class ModuleLoader;
152  class MultiLevelTemplateArgumentList;
153  class NamedDecl;
154  class ObjCCategoryDecl;
155  class ObjCCategoryImplDecl;
156  class ObjCCompatibleAliasDecl;
157  class ObjCContainerDecl;
158  class ObjCImplDecl;
159  class ObjCImplementationDecl;
160  class ObjCInterfaceDecl;
161  class ObjCIvarDecl;
162  template <class T> class ObjCList;
163  class ObjCMessageExpr;
164  class ObjCMethodDecl;
165  class ObjCPropertyDecl;
166  class ObjCProtocolDecl;
167  class OMPThreadPrivateDecl;
168  class OMPRequiresDecl;
169  class OMPDeclareReductionDecl;
170  class OMPDeclareSimdDecl;
171  class OMPClause;
172  struct OMPVarListLocTy;
173  struct OverloadCandidate;
174  enum class OverloadCandidateParamOrder : char;
176  class OverloadCandidateSet;
177  class OverloadExpr;
178  class ParenListExpr;
179  class ParmVarDecl;
180  class Preprocessor;
181  class PseudoDestructorTypeStorage;
182  class PseudoObjectExpr;
183  class QualType;
184  class StandardConversionSequence;
185  class Stmt;
186  class StringLiteral;
187  class SwitchStmt;
188  class TemplateArgument;
189  class TemplateArgumentList;
190  class TemplateArgumentLoc;
191  class TemplateDecl;
192  class TemplateInstantiationCallback;
193  class TemplateParameterList;
194  class TemplatePartialOrderingContext;
195  class TemplateTemplateParmDecl;
196  class Token;
197  class TypeAliasDecl;
198  class TypedefDecl;
199  class TypedefNameDecl;
200  class TypeLoc;
201  class TypoCorrectionConsumer;
202  class UnqualifiedId;
203  class UnresolvedLookupExpr;
204  class UnresolvedMemberExpr;
205  class UnresolvedSetImpl;
206  class UnresolvedSetIterator;
207  class UsingDecl;
208  class UsingShadowDecl;
209  class ValueDecl;
210  class VarDecl;
211  class VarTemplateSpecializationDecl;
212  class VisibilityAttr;
213  class VisibleDeclConsumer;
214  class IndirectFieldDecl;
215  struct DeductionFailureInfo;
216  class TemplateSpecCandidateSet;
217 
218 namespace sema {
219  class AccessedEntity;
220  class BlockScopeInfo;
221  class Capture;
222  class CapturedRegionScopeInfo;
223  class CapturingScopeInfo;
224  class CompoundScopeInfo;
225  class DelayedDiagnostic;
226  class DelayedDiagnosticPool;
227  class FunctionScopeInfo;
228  class LambdaScopeInfo;
229  class PossiblyUnreachableDiag;
230  class SemaPPCallbacks;
231  class TemplateDeductionInfo;
232 }
233 
234 namespace threadSafety {
235  class BeforeSet;
236  void threadSafetyCleanup(BeforeSet* Cache);
237 }
238 
239 // FIXME: No way to easily map from TemplateTypeParmTypes to
240 // TemplateTypeParmDecls, so we have this horrible PointerUnion.
241 typedef std::pair<llvm::PointerUnion<const TemplateTypeParmType*, NamedDecl*>,
243 
244 /// Describes whether we've seen any nullability information for the given
245 /// file.
247  /// The first pointer declarator (of any pointer kind) in the file that does
248  /// not have a corresponding nullability annotation.
250 
251  /// The end location for the first pointer declarator in the file. Used for
252  /// placing fix-its.
254 
255  /// Which kind of pointer declarator we saw.
256  uint8_t PointerKind;
257 
258  /// Whether we saw any type nullability annotations in the given file.
259  bool SawTypeNullability = false;
260 };
261 
262 /// A mapping from file IDs to a record of whether we've seen nullability
263 /// information in that file.
265  /// A mapping from file IDs to the nullability information for each file ID.
266  llvm::DenseMap<FileID, FileNullability> Map;
267 
268  /// A single-element cache based on the file ID.
269  struct {
272  } Cache;
273 
274 public:
276  // Check the single-element cache.
277  if (file == Cache.File)
278  return Cache.Nullability;
279 
280  // It's not in the single-element cache; flush the cache if we have one.
281  if (!Cache.File.isInvalid()) {
282  Map[Cache.File] = Cache.Nullability;
283  }
284 
285  // Pull this entry into the cache.
286  Cache.File = file;
287  Cache.Nullability = Map[file];
288  return Cache.Nullability;
289  }
290 };
291 
292 // TODO SYCL Integration header approach relies on an assumption that kernel
293 // lambda objects created by the host compiler and any of the device compilers
294 // will be identical wrt to field types, order and offsets. Some verification
295 // mechanism should be developed to enforce that.
296 
297 // TODO FIXME SYCL Support for SYCL in FE should be refactored:
298 // - kernel identification and generation should be made a separate pass over
299 // AST. RecursiveASTVisitor + VisitFunctionTemplateDecl +
300 // FunctionTemplateDecl::getSpecializations() mechanism could be used for that.
301 // - All SYCL stuff on Sema level should be encapsulated into a single Sema
302 // field
303 // - Move SYCL stuff into a separate header
304 
305 // Represents contents of a SYCL integration header file produced by a SYCL
306 // device compiler and used by SYCL host compiler (via forced inclusion into
307 // compiled SYCL source):
308 // - SYCL kernel names
309 // - SYCL kernel parameters and offsets of corresponding actual arguments
311 public:
312  // Kind of kernel's parameters as captured by the compiler in the
313  // kernel lambda or function object
323  };
324 
325 public:
327 
328  /// Emits contents of the header into given stream.
329  void emit(raw_ostream &Out);
330 
331  /// Emits contents of the header into a file with given name.
332  /// Returns true/false on success/failure.
333  bool emit(StringRef MainSrc);
334 
335  /// Signals that subsequent parameter descriptor additions will go to
336  /// the kernel with given name. Starts new kernel invocation descriptor.
337  void startKernel(const FunctionDecl *SyclKernel, QualType KernelNameType,
338  SourceLocation Loc, bool IsESIMD, bool IsUnnamedKernel,
339  int64_t ObjSize);
340 
341  /// Adds a kernel parameter descriptor to current kernel invocation
342  /// descriptor.
343  void addParamDesc(kernel_param_kind_t Kind, int Info, unsigned Offset);
344 
345  /// Signals that addition of parameter descriptors to current kernel
346  /// invocation descriptor has finished.
347  void endKernel();
348 
349  /// Registers a specialization constant to emit info for it into the header.
350  void addSpecConstant(StringRef IDName, QualType IDType);
351 
352  /// Update the names of a kernel description based on its SyclKernel.
353  void updateKernelNames(const FunctionDecl *SyclKernel, StringRef Name,
354  StringRef StableName) {
355  auto Itr = llvm::find_if(KernelDescs, [SyclKernel](const KernelDesc &KD) {
356  return KD.SyclKernel == SyclKernel;
357  });
358 
359  assert(Itr != KernelDescs.end() && "Unknown kernel description");
360  Itr->updateKernelNames(Name, StableName);
361  }
362 
363  /// Signals that emission of __sycl_device_global_registration type and
364  /// declaration of variable __sycl_device_global_registrar of this type in
365  /// integration header is required.
367  NeedToEmitDeviceGlobalRegistration = true;
368  }
369 
370 private:
371  // Kernel actual parameter descriptor.
372  struct KernelParamDesc {
373  // Represents a parameter kind.
375  // If Kind is kind_scalar or kind_struct, then
376  // denotes parameter size in bytes (includes padding for structs)
377  // If Kind is kind_accessor
378  // denotes access target; possible access targets are defined in
379  // access/access.hpp
380  int Info = 0;
381  // Offset of the captured parameter value in the lambda or function object.
382  unsigned Offset = 0;
383 
384  KernelParamDesc() = default;
385  };
386 
387  // Kernel invocation descriptor
388  struct KernelDesc {
389  /// sycl_kernel function associated with this kernel.
390  const FunctionDecl *SyclKernel;
391 
392  /// Kernel name.
393  std::string Name;
394 
395  /// Kernel name type.
396  QualType NameType;
397 
398  /// Kernel name with stable lambda name mangling
399  std::string StableName;
400 
401  SourceLocation KernelLocation;
402 
403  /// Whether this kernel is an ESIMD one.
404  bool IsESIMDKernel;
405 
406  /// Descriptor of kernel actual parameters.
407  SmallVector<KernelParamDesc, 8> Params;
408 
409  // If we are in unnamed kernel/lambda mode AND this is one that the user
410  // hasn't provided an explicit name for.
411  bool IsUnnamedKernel;
412 
413  /// Size of the kernel object.
414  int64_t ObjSize = 0;
415 
416  KernelDesc(const FunctionDecl *SyclKernel, QualType NameType,
417  SourceLocation KernelLoc, bool IsESIMD, bool IsUnnamedKernel,
418  int64_t ObjSize)
419  : SyclKernel(SyclKernel), NameType(NameType), KernelLocation(KernelLoc),
420  IsESIMDKernel(IsESIMD), IsUnnamedKernel(IsUnnamedKernel),
421  ObjSize(ObjSize) {}
422 
423  void updateKernelNames(StringRef Name, StringRef StableName) {
424  this->Name = Name.str();
425  this->StableName = StableName.str();
426  }
427  };
428 
429  /// Returns the latest invocation descriptor started by
430  /// SYCLIntegrationHeader::startKernel
431  KernelDesc *getCurKernelDesc() {
432  return KernelDescs.size() > 0 ? &KernelDescs[KernelDescs.size() - 1]
433  : nullptr;
434  }
435 
436 private:
437  /// Keeps invocation descriptors for each kernel invocation started by
438  /// SYCLIntegrationHeader::startKernel
439  SmallVector<KernelDesc, 4> KernelDescs;
440 
441  using SpecConstID = std::pair<QualType, std::string>;
442 
443  /// Keeps specialization constants met in the translation unit. Maps spec
444  /// constant's ID type to generated unique name. Duplicates are removed at
445  /// integration header emission time.
447 
448  Sema &S;
449 
450  /// Keeps track of whether declaration of __sycl_device_global_registration
451  /// type and __sycl_device_global_registrar variable are required to emit.
452  bool NeedToEmitDeviceGlobalRegistration = false;
453 };
454 
456 public:
458  bool emit(StringRef MainSrc);
459  void addVarDecl(const VarDecl *VD);
460 
461 private:
462  bool emit(raw_ostream &O);
463  Sema &S;
465  void emitSpecIDName(raw_ostream &O, const VarDecl *VD);
466 };
467 
468 /// Tracks expected type during expression parsing, for use in code completion.
469 /// The type is tied to a particular token, all functions that update or consume
470 /// the type take a start location of the token they are looking at as a
471 /// parameter. This avoids updating the type on hot paths in the parser.
473 public:
474  PreferredTypeBuilder(bool Enabled) : Enabled(Enabled) {}
475 
476  void enterCondition(Sema &S, SourceLocation Tok);
477  void enterReturn(Sema &S, SourceLocation Tok);
478  void enterVariableInit(SourceLocation Tok, Decl *D);
479  /// Handles e.g. BaseType{ .D = Tok...
481  const Designation &D);
482  /// Computing a type for the function argument may require running
483  /// overloading, so we postpone its computation until it is actually needed.
484  ///
485  /// Clients should be very careful when using this funciton, as it stores a
486  /// function_ref, clients should make sure all calls to get() with the same
487  /// location happen while function_ref is alive.
488  ///
489  /// The callback should also emit signature help as a side-effect, but only
490  /// if the completion point has been reached.
492  llvm::function_ref<QualType()> ComputeType);
493 
494  void enterParenExpr(SourceLocation Tok, SourceLocation LParLoc);
495  void enterUnary(Sema &S, SourceLocation Tok, tok::TokenKind OpKind,
496  SourceLocation OpLoc);
497  void enterBinary(Sema &S, SourceLocation Tok, Expr *LHS, tok::TokenKind Op);
498  void enterMemAccess(Sema &S, SourceLocation Tok, Expr *Base);
499  void enterSubscript(Sema &S, SourceLocation Tok, Expr *LHS);
500  /// Handles all type casts, including C-style cast, C++ casts, etc.
502 
503  /// Get the expected type associated with this location, if any.
504  ///
505  /// If the location is a function argument, determining the expected type
506  /// involves considering all function overloads and the arguments so far.
507  /// In this case, signature help for these function overloads will be reported
508  /// as a side-effect (only if the completion point has been reached).
510  if (!Enabled || Tok != ExpectedLoc)
511  return QualType();
512  if (!Type.isNull())
513  return Type;
514  if (ComputeType)
515  return ComputeType();
516  return QualType();
517  }
518 
519 private:
520  bool Enabled;
521  /// Start position of a token for which we store expected type.
522  SourceLocation ExpectedLoc;
523  /// Expected type for a token starting at ExpectedLoc.
524  QualType Type;
525  /// A function to compute expected type at ExpectedLoc. It is only considered
526  /// if Type is null.
527  llvm::function_ref<QualType()> ComputeType;
528 };
529 
530 /// Sema - This implements semantic analysis and AST building for C.
531 class Sema final {
532  Sema(const Sema &) = delete;
533  void operator=(const Sema &) = delete;
534 
535  ///Source of additional semantic information.
536  ExternalSemaSource *ExternalSource;
537 
538  ///Whether Sema has generated a multiplexer and has to delete it.
539  bool isMultiplexExternalSource;
540 
541  static bool mightHaveNonExternalLinkage(const DeclaratorDecl *FD);
542 
543  bool isVisibleSlow(const NamedDecl *D);
544 
545  /// Determine whether two declarations should be linked together, given that
546  /// the old declaration might not be visible and the new declaration might
547  /// not have external linkage.
548  bool shouldLinkPossiblyHiddenDecl(const NamedDecl *Old,
549  const NamedDecl *New) {
550  if (isVisible(Old))
551  return true;
552  // See comment in below overload for why it's safe to compute the linkage
553  // of the new declaration here.
554  if (New->isExternallyDeclarable()) {
555  assert(Old->isExternallyDeclarable() &&
556  "should not have found a non-externally-declarable previous decl");
557  return true;
558  }
559  return false;
560  }
561  bool shouldLinkPossiblyHiddenDecl(LookupResult &Old, const NamedDecl *New);
562 
563  void setupImplicitSpecialMemberType(CXXMethodDecl *SpecialMem,
564  QualType ResultTy,
565  ArrayRef<QualType> Args);
566 
567 public:
568  /// The maximum alignment, same as in llvm::Value. We duplicate them here
569  /// because that allows us not to duplicate the constants in clang code,
570  /// which we must to since we can't directly use the llvm constants.
571  /// The value is verified against llvm here: lib/CodeGen/CGDecl.cpp
572  ///
573  /// This is the greatest alignment value supported by load, store, and alloca
574  /// instructions, and global values.
575  static const unsigned MaxAlignmentExponent = 32;
576  static const uint64_t MaximumAlignment = 1ull << MaxAlignmentExponent;
577 
581 
584 
591 
592  /// Flag indicating whether or not to collect detailed statistics.
594 
595  /// Code-completion consumer.
597 
598  /// CurContext - This is the current declaration context of parsing.
600 
601  /// Generally null except when we temporarily switch decl contexts,
602  /// like in \see ActOnObjCTemporaryExitContainerContext.
604 
605  /// VAListTagName - The declaration name corresponding to __va_list_tag.
606  /// This is used as part of a hack to omit that class from ADL results.
608 
609  bool MSStructPragmaOn; // True when \#pragma ms_struct on
610 
611  /// Controls member pointer representation format under the MS ABI.
614 
615  /// Stack of active SEH __finally scopes. Can be empty.
617 
618  /// Source location for newly created implicit MSInheritanceAttrs
620 
621  /// Holds TypoExprs that are created from `createDelayedTypo`. This is used by
622  /// `TransformTypos` in order to keep track of any TypoExprs that are created
623  /// recursively during typo correction and wipe them away if the correction
624  /// fails.
626 
627  /// pragma clang section kind
630  PCSK_BSS = 1,
635  };
636 
638  PCSA_Set = 0,
640  };
641 
644  bool Valid = false;
646  };
647 
653 
655  PSK_Reset = 0x0, // #pragma ()
656  PSK_Set = 0x1, // #pragma (value)
657  PSK_Push = 0x2, // #pragma (push[, id])
658  PSK_Pop = 0x4, // #pragma (pop[, id])
659  PSK_Show = 0x8, // #pragma (show) -- only for "pack"!
660  PSK_Push_Set = PSK_Push | PSK_Set, // #pragma (push[, id], value)
661  PSK_Pop_Set = PSK_Pop | PSK_Set, // #pragma (pop[, id], value)
662  };
663 
664  // #pragma pack and align.
666  public:
667  // `Native` represents default align mode, which may vary based on the
668  // platform.
669  enum Mode : unsigned char { Native, Natural, Packed, Mac68k };
670 
671  // #pragma pack info constructor
672  AlignPackInfo(AlignPackInfo::Mode M, unsigned Num, bool IsXL)
673  : PackAttr(true), AlignMode(M), PackNumber(Num), XLStack(IsXL) {
674  assert(Num == PackNumber && "The pack number has been truncated.");
675  }
676 
677  // #pragma align info constructor
679  : PackAttr(false), AlignMode(M),
680  PackNumber(M == Packed ? 1 : UninitPackVal), XLStack(IsXL) {}
681 
682  explicit AlignPackInfo(bool IsXL) : AlignPackInfo(Native, IsXL) {}
683 
685 
686  // When a AlignPackInfo itself cannot be used, this returns an 32-bit
687  // integer encoding for it. This should only be passed to
688  // AlignPackInfo::getFromRawEncoding, it should not be inspected directly.
689  static uint32_t getRawEncoding(const AlignPackInfo &Info) {
690  std::uint32_t Encoding{};
691  if (Info.IsXLStack())
692  Encoding |= IsXLMask;
693 
694  Encoding |= static_cast<uint32_t>(Info.getAlignMode()) << 1;
695 
696  if (Info.IsPackAttr())
697  Encoding |= PackAttrMask;
698 
699  Encoding |= static_cast<uint32_t>(Info.getPackNumber()) << 4;
700 
701  return Encoding;
702  }
703 
705  bool IsXL = static_cast<bool>(Encoding & IsXLMask);
707  static_cast<AlignPackInfo::Mode>((Encoding & AlignModeMask) >> 1);
708  int PackNumber = (Encoding & PackNumMask) >> 4;
709 
710  if (Encoding & PackAttrMask)
711  return AlignPackInfo(M, PackNumber, IsXL);
712 
713  return AlignPackInfo(M, IsXL);
714  }
715 
716  bool IsPackAttr() const { return PackAttr; }
717 
718  bool IsAlignAttr() const { return !PackAttr; }
719 
720  Mode getAlignMode() const { return AlignMode; }
721 
722  unsigned getPackNumber() const { return PackNumber; }
723 
724  bool IsPackSet() const {
725  // #pragma align, #pragma pack(), and #pragma pack(0) do not set the pack
726  // attriute on a decl.
727  return PackNumber != UninitPackVal && PackNumber != 0;
728  }
729 
730  bool IsXLStack() const { return XLStack; }
731 
732  bool operator==(const AlignPackInfo &Info) const {
733  return std::tie(AlignMode, PackNumber, PackAttr, XLStack) ==
734  std::tie(Info.AlignMode, Info.PackNumber, Info.PackAttr,
735  Info.XLStack);
736  }
737 
738  bool operator!=(const AlignPackInfo &Info) const {
739  return !(*this == Info);
740  }
741 
742  private:
743  /// \brief True if this is a pragma pack attribute,
744  /// not a pragma align attribute.
745  bool PackAttr;
746 
747  /// \brief The alignment mode that is in effect.
748  Mode AlignMode;
749 
750  /// \brief The pack number of the stack.
751  unsigned char PackNumber;
752 
753  /// \brief True if it is a XL #pragma align/pack stack.
754  bool XLStack;
755 
756  /// \brief Uninitialized pack value.
757  static constexpr unsigned char UninitPackVal = -1;
758 
759  // Masks to encode and decode an AlignPackInfo.
760  static constexpr uint32_t IsXLMask{0x0000'0001};
761  static constexpr uint32_t AlignModeMask{0x0000'0006};
762  static constexpr uint32_t PackAttrMask{0x00000'0008};
763  static constexpr uint32_t PackNumMask{0x0000'01F0};
764  };
765 
766  template<typename ValueType>
767  struct PragmaStack {
768  struct Slot {
769  llvm::StringRef StackSlotLabel;
770  ValueType Value;
773  Slot(llvm::StringRef StackSlotLabel, ValueType Value,
778  };
779 
780  void Act(SourceLocation PragmaLocation, PragmaMsStackAction Action,
781  llvm::StringRef StackSlotLabel, ValueType Value) {
782  if (Action == PSK_Reset) {
784  CurrentPragmaLocation = PragmaLocation;
785  return;
786  }
787  if (Action & PSK_Push)
788  Stack.emplace_back(StackSlotLabel, CurrentValue, CurrentPragmaLocation,
789  PragmaLocation);
790  else if (Action & PSK_Pop) {
791  if (!StackSlotLabel.empty()) {
792  // If we've got a label, try to find it and jump there.
793  auto I = llvm::find_if(llvm::reverse(Stack), [&](const Slot &x) {
794  return x.StackSlotLabel == StackSlotLabel;
795  });
796  // If we found the label so pop from there.
797  if (I != Stack.rend()) {
798  CurrentValue = I->Value;
799  CurrentPragmaLocation = I->PragmaLocation;
800  Stack.erase(std::prev(I.base()), Stack.end());
801  }
802  } else if (!Stack.empty()) {
803  // We do not have a label, just pop the last entry.
804  CurrentValue = Stack.back().Value;
805  CurrentPragmaLocation = Stack.back().PragmaLocation;
806  Stack.pop_back();
807  }
808  }
809  if (Action & PSK_Set) {
811  CurrentPragmaLocation = PragmaLocation;
812  }
813  }
814 
815  // MSVC seems to add artificial slots to #pragma stacks on entering a C++
816  // method body to restore the stacks on exit, so it works like this:
817  //
818  // struct S {
819  // #pragma <name>(push, InternalPragmaSlot, <current_pragma_value>)
820  // void Method {}
821  // #pragma <name>(pop, InternalPragmaSlot)
822  // };
823  //
824  // It works even with #pragma vtordisp, although MSVC doesn't support
825  // #pragma vtordisp(push [, id], n)
826  // syntax.
827  //
828  // Push / pop a named sentinel slot.
829  void SentinelAction(PragmaMsStackAction Action, StringRef Label) {
830  assert((Action == PSK_Push || Action == PSK_Pop) &&
831  "Can only push / pop #pragma stack sentinels!");
833  }
834 
835  // Constructors.
836  explicit PragmaStack(const ValueType &Default)
838 
839  bool hasValue() const { return CurrentValue != DefaultValue; }
840 
842  ValueType DefaultValue; // Value used for PSK_Reset action.
843  ValueType CurrentValue;
845  };
846  // FIXME: We should serialize / deserialize these if they occur in a PCH (but
847  // we shouldn't do so if they're in a module).
848 
849  /// Whether to insert vtordisps prior to virtual bases in the Microsoft
850  /// C++ ABI. Possible values are 0, 1, and 2, which mean:
851  ///
852  /// 0: Suppress all vtordisps
853  /// 1: Insert vtordisps in the presence of vbase overrides and non-trivial
854  /// structors
855  /// 2: Always insert vtordisps to support RTTI on partially constructed
856  /// objects
859  // The current #pragma align/pack values and locations at each #include.
864  };
866  // Segment #pragmas.
871 
872  // This stack tracks the current state of Sema.CurFPFeatures.
875  FPOptionsOverride result;
876  if (!FpPragmaStack.hasValue()) {
877  result = FPOptionsOverride();
878  } else {
879  result = FpPragmaStack.CurrentValue;
880  }
881  return result;
882  }
883 
884  // RAII object to push / pop sentinel slots for all MS #pragma stacks.
885  // Actions should be performed only if we enter / exit a C++ method body.
887  public:
888  PragmaStackSentinelRAII(Sema &S, StringRef SlotLabel, bool ShouldAct);
890 
891  private:
892  Sema &S;
893  StringRef SlotLabel;
894  bool ShouldAct;
895  };
896 
897  /// A mapping that describes the nullability we've seen in each header file.
899 
900  /// Last section used with #pragma init_seg.
903 
904  /// VisContext - Manages the stack for \#pragma GCC visibility.
905  void *VisContext; // Really a "PragmaVisStack*"
906 
907  /// This an attribute introduced by \#pragma clang attribute.
912  bool IsUsed;
913  };
914 
915  /// A push'd group of PragmaAttributeEntries.
917  /// The location of the push attribute.
919  /// The namespace of this push group.
922  };
923 
925 
926  /// The declaration that is currently receiving an attribute from the
927  /// #pragma attribute stack.
929 
930  /// This represents the last location of a "#pragma clang optimize off"
931  /// directive if such a directive has not been closed by an "on" yet. If
932  /// optimizations are currently "on", this is set to an invalid location.
934 
935  /// Flag indicating if Sema is building a recovery call expression.
936  ///
937  /// This flag is used to avoid building recovery call expressions
938  /// if Sema is already doing so, which would cause infinite recursions.
940 
941  /// Used to control the generation of ExprWithCleanups.
943 
944  /// ExprCleanupObjects - This is the stack of objects requiring
945  /// cleanup that are created by the current full expression.
947 
948  /// Store a set of either DeclRefExprs or MemberExprs that contain a reference
949  /// to a variable (constant) that may or may not be odr-used in this Expr, and
950  /// we won't know until all lvalue-to-rvalue and discarded value conversions
951  /// have been applied to all subexpressions of the enclosing full expression.
952  /// This is cleared at the end of each full expression.
953  using MaybeODRUseExprSet = llvm::SetVector<Expr *, SmallVector<Expr *, 4>,
956 
957  std::unique_ptr<sema::FunctionScopeInfo> CachedFunctionScope;
958 
959  /// Stack containing information about each of the nested
960  /// function, block, and method scopes that are currently active.
962 
963  /// The index of the first FunctionScope that corresponds to the current
964  /// context.
965  unsigned FunctionScopesStart = 0;
966 
968  return llvm::makeArrayRef(FunctionScopes.begin() + FunctionScopesStart,
969  FunctionScopes.end());
970  }
971 
972  /// Stack containing information needed when in C++2a an 'auto' is encountered
973  /// in a function declaration parameter type specifier in order to invent a
974  /// corresponding template parameter in the enclosing abbreviated function
975  /// template. This information is also present in LambdaScopeInfo, stored in
976  /// the FunctionScopes stack.
978 
979  /// The index of the first InventedParameterInfo that refers to the current
980  /// context.
982 
984  return llvm::makeArrayRef(InventedParameterInfos.begin() +
986  InventedParameterInfos.end());
987  }
988 
992 
993  /// ExtVectorDecls - This is a list all the extended vector types. This allows
994  /// us to associate a raw vector type with one of the ext_vector type names.
995  /// This is only necessary for issuing pretty diagnostics.
997 
998  /// FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
999  std::unique_ptr<CXXFieldCollector> FieldCollector;
1000 
1002 
1003  /// Set containing all declared private fields that are not used.
1005 
1006  /// Set containing all typedefs that are likely unused.
1009 
1010  /// Delete-expressions to be analyzed at the end of translation unit
1011  ///
1012  /// This list contains class members, and locations of delete-expressions
1013  /// that could not be proven as to whether they mismatch with new-expression
1014  /// used in initializer of the field.
1015  typedef std::pair<SourceLocation, bool> DeleteExprLoc;
1017  llvm::MapVector<FieldDecl *, DeleteLocs> DeleteExprs;
1018 
1020 
1021  /// PureVirtualClassDiagSet - a set of class declarations which we have
1022  /// emitted a list of pure virtual functions. Used to prevent emitting the
1023  /// same list more than once.
1024  std::unique_ptr<RecordDeclSetTy> PureVirtualClassDiagSet;
1025 
1026  /// ParsingInitForAutoVars - a set of declarations with auto types for which
1027  /// we are currently parsing the initializer.
1029 
1030  /// Look for a locally scoped extern "C" declaration by the given name.
1032 
1036 
1037  /// All the tentative definitions encountered in the TU.
1039 
1040  /// All the external declarations encoutered and used in the TU.
1042 
1043  typedef LazyVector<const DeclaratorDecl *, ExternalSemaSource,
1046 
1047  /// The set of file scoped decls seen so far that have not been used
1048  /// and must warn if not used. Only contains the first declaration.
1050 
1054 
1055  /// All the delegating constructors seen so far in the file, used for
1056  /// cycle detection at the end of the TU.
1058 
1059  /// All the overriding functions seen during a class definition
1060  /// that had their exception spec checks delayed, plus the overridden
1061  /// function.
1064 
1065  /// All the function redeclarations seen during a class definition that had
1066  /// their exception spec checks delayed, plus the prior declaration they
1067  /// should be checked against. Except during error recovery, the new decl
1068  /// should always be a friend declaration, as that's the only valid way to
1069  /// redeclare a special member before its class is complete.
1072 
1073  typedef llvm::MapVector<const FunctionDecl *,
1074  std::unique_ptr<LateParsedTemplate>>
1077 
1078  /// Callback to the parser to parse templated functions when needed.
1079  typedef void LateTemplateParserCB(void *P, LateParsedTemplate &LPT);
1080  typedef void LateTemplateParserCleanupCB(void *P);
1084 
1086  LateTemplateParserCleanupCB *LTPCleanup,
1087  void *P) {
1088  LateTemplateParser = LTP;
1089  LateTemplateParserCleanup = LTPCleanup;
1090  OpaqueParser = P;
1091  }
1092 
1093  class DelayedDiagnostics;
1094 
1096  sema::DelayedDiagnosticPool *SavedPool;
1098  };
1101 
1102  /// A class which encapsulates the logic for delaying diagnostics
1103  /// during parsing and other processing.
1105  /// The current pool of diagnostics into which delayed
1106  /// diagnostics should go.
1107  sema::DelayedDiagnosticPool *CurPool;
1108 
1109  public:
1110  DelayedDiagnostics() : CurPool(nullptr) {}
1111 
1112  /// Adds a delayed diagnostic.
1113  void add(const sema::DelayedDiagnostic &diag); // in DelayedDiagnostic.h
1114 
1115  /// Determines whether diagnostics should be delayed.
1116  bool shouldDelayDiagnostics() { return CurPool != nullptr; }
1117 
1118  /// Returns the current delayed-diagnostics pool.
1120  return CurPool;
1121  }
1122 
1123  /// Enter a new scope. Access and deprecation diagnostics will be
1124  /// collected in this pool.
1127  state.SavedPool = CurPool;
1128  CurPool = &pool;
1129  return state;
1130  }
1131 
1132  /// Leave a delayed-diagnostic state that was previously pushed.
1133  /// Do not emit any of the diagnostics. This is performed as part
1134  /// of the bookkeeping of popping a pool "properly".
1136  CurPool = state.SavedPool;
1137  }
1138 
1139  /// Enter a new scope where access and deprecation diagnostics are
1140  /// not delayed.
1143  state.SavedPool = CurPool;
1144  CurPool = nullptr;
1145  return state;
1146  }
1147 
1148  /// Undo a previous pushUndelayed().
1150  assert(CurPool == nullptr);
1151  CurPool = state.SavedPool;
1152  }
1154 
1155  /// A RAII object to temporarily push a declaration context.
1156  class ContextRAII {
1157  private:
1158  Sema &S;
1159  DeclContext *SavedContext;
1160  ProcessingContextState SavedContextState;
1161  QualType SavedCXXThisTypeOverride;
1162  unsigned SavedFunctionScopesStart;
1163  unsigned SavedInventedParameterInfosStart;
1164 
1165  public:
1166  ContextRAII(Sema &S, DeclContext *ContextToPush, bool NewThisContext = true)
1167  : S(S), SavedContext(S.CurContext),
1168  SavedContextState(S.DelayedDiagnostics.pushUndelayed()),
1169  SavedCXXThisTypeOverride(S.CXXThisTypeOverride),
1170  SavedFunctionScopesStart(S.FunctionScopesStart),
1171  SavedInventedParameterInfosStart(S.InventedParameterInfosStart)
1172  {
1173  assert(ContextToPush && "pushing null context");
1174  S.CurContext = ContextToPush;
1175  if (NewThisContext)
1176  S.CXXThisTypeOverride = QualType();
1177  // Any saved FunctionScopes do not refer to this context.
1178  S.FunctionScopesStart = S.FunctionScopes.size();
1179  S.InventedParameterInfosStart = S.InventedParameterInfos.size();
1180  }
1181 
1182  void pop() {
1183  if (!SavedContext) return;
1184  S.CurContext = SavedContext;
1185  S.DelayedDiagnostics.popUndelayed(SavedContextState);
1186  S.CXXThisTypeOverride = SavedCXXThisTypeOverride;
1187  S.FunctionScopesStart = SavedFunctionScopesStart;
1188  S.InventedParameterInfosStart = SavedInventedParameterInfosStart;
1189  SavedContext = nullptr;
1190  }
1191 
1193  pop();
1194  }
1195  };
1196 
1197  /// Whether the AST is currently being rebuilt to correct immediate
1198  /// invocations. Immediate invocation candidates and references to consteval
1199  /// functions aren't tracked when this is set.
1201 
1202  /// Used to change context to isConstantEvaluated without pushing a heavy
1203  /// ExpressionEvaluationContextRecord object.
1205 
1207  return ExprEvalContexts.back().isConstantEvaluated() ||
1209  }
1210 
1211  /// RAII object to handle the state changes required to synthesize
1212  /// a function body.
1214  Sema &S;
1215  Sema::ContextRAII SavedContext;
1216  bool PushedCodeSynthesisContext = false;
1217 
1218  public:
1220  : S(S), SavedContext(S, DC) {
1221  S.PushFunctionScope();
1222  S.PushExpressionEvaluationContext(
1224  if (auto *FD = dyn_cast<FunctionDecl>(DC))
1225  FD->setWillHaveBody(true);
1226  else
1227  assert(isa<ObjCMethodDecl>(DC));
1228  }
1229 
1231  assert(!PushedCodeSynthesisContext);
1232 
1235  Ctx.PointOfInstantiation = UseLoc;
1236  Ctx.Entity = cast<Decl>(S.CurContext);
1237  S.pushCodeSynthesisContext(Ctx);
1238 
1239  PushedCodeSynthesisContext = true;
1240  }
1241 
1243  if (PushedCodeSynthesisContext)
1244  S.popCodeSynthesisContext();
1245  if (auto *FD = dyn_cast<FunctionDecl>(S.CurContext))
1246  FD->setWillHaveBody(false);
1247  S.PopExpressionEvaluationContext();
1248  S.PopFunctionScopeInfo();
1249  }
1250  };
1251 
1252  /// WeakUndeclaredIdentifiers - Identifiers contained in \#pragma weak before
1253  /// declared. Rare. May alias another identifier, declared or undeclared.
1254  ///
1255  /// For aliases, the target identifier is used as a key for eventual
1256  /// processing when the target is declared. For the single-identifier form,
1257  /// the sole identifier is used as the key. Each entry is a `SetVector`
1258  /// (ordered by parse order) of aliases (identified by the alias name) in case
1259  /// of multiple aliases to the same undeclared identifier.
1260  llvm::MapVector<
1261  IdentifierInfo *,
1262  llvm::SetVector<
1264  llvm::SmallDenseSet<WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly>>>
1266 
1267  /// ExtnameUndeclaredIdentifiers - Identifiers contained in
1268  /// \#pragma redefine_extname before declared. Used in Solaris system headers
1269  /// to define functions that occur in multiple standards to call the version
1270  /// in the currently selected standard.
1271  llvm::DenseMap<IdentifierInfo*,AsmLabelAttr*> ExtnameUndeclaredIdentifiers;
1272 
1273 
1274  /// Load weak undeclared identifiers from the external source.
1276 
1277  /// WeakTopLevelDecl - Translation-unit scoped declarations generated by
1278  /// \#pragma weak during processing of other Decls.
1279  /// I couldn't figure out a clean way to generate these in-line, so
1280  /// we store them here and handle separately -- which is a hack.
1281  /// It would be best to refactor this.
1283 
1285 
1286  /// Translation Unit Scope - useful to Objective-C actions that need
1287  /// to lookup file scope declarations in the "ordinary" C decl namespace.
1288  /// For example, user-defined classes, built-in "id" type, etc.
1290 
1291  /// The C++ "std" namespace, where the standard library resides.
1293 
1294  /// The C++ "std::bad_alloc" class, which is defined by the C++
1295  /// standard library.
1297 
1298  /// The C++ "std::align_val_t" enum class, which is defined by the C++
1299  /// standard library.
1301 
1302  /// The C++ "std::experimental" namespace, where the experimental parts
1303  /// of the standard library resides.
1305 
1306  /// The C++ "std::initializer_list" template, which is defined in
1307  /// <initializer_list>.
1309 
1310  /// The C++ "std::coroutine_traits" template, which is defined in
1311  /// <coroutine_traits>
1313  /// The namespace where coroutine components are defined. In standard,
1314  /// they are defined in std namespace. And in the previous implementation,
1315  /// they are defined in std::experimental namespace.
1317 
1318  /// The C++ "type_info" declaration, which is defined in <typeinfo>.
1320 
1321  /// The MSVC "_GUID" struct, which is defined in MSVC header files.
1323 
1324  /// Caches identifiers/selectors for NSFoundation APIs.
1325  std::unique_ptr<NSAPI> NSAPIObj;
1326 
1327  /// The declaration of the Objective-C NSNumber class.
1329 
1330  /// The declaration of the Objective-C NSValue class.
1332 
1333  /// Pointer to NSNumber type (NSNumber *).
1335 
1336  /// Pointer to NSValue type (NSValue *).
1338 
1339  /// The Objective-C NSNumber methods used to create NSNumber literals.
1341 
1342  /// The declaration of the Objective-C NSString class.
1344 
1345  /// Pointer to NSString type (NSString *).
1347 
1348  /// The declaration of the stringWithUTF8String: method.
1350 
1351  /// The declaration of the valueWithBytes:objCType: method.
1353 
1354  /// The declaration of the Objective-C NSArray class.
1356 
1357  /// The declaration of the arrayWithObjects:count: method.
1359 
1360  /// The declaration of the Objective-C NSDictionary class.
1362 
1363  /// The declaration of the dictionaryWithObjects:forKeys:count: method.
1365 
1366  /// id<NSCopying> type.
1368 
1369  /// will hold 'respondsToSelector:'
1371 
1372  /// A flag to remember whether the implicit forms of operator new and delete
1373  /// have been declared.
1375 
1376  /// Describes how the expressions currently being parsed are
1377  /// evaluated at run-time, if at all.
1379  /// The current expression and its subexpressions occur within an
1380  /// unevaluated operand (C++11 [expr]p7), such as the subexpression of
1381  /// \c sizeof, where the type of the expression may be significant but
1382  /// no code will be generated to evaluate the value of the expression at
1383  /// run time.
1384  Unevaluated,
1385 
1386  /// The current expression occurs within a braced-init-list within
1387  /// an unevaluated operand. This is mostly like a regular unevaluated
1388  /// context, except that we still instantiate constexpr functions that are
1389  /// referenced here so that we can perform narrowing checks correctly.
1391 
1392  /// The current expression occurs within a discarded statement.
1393  /// This behaves largely similarly to an unevaluated operand in preventing
1394  /// definitions from being required, but not in other ways.
1396 
1397  /// The current expression occurs within an unevaluated
1398  /// operand that unconditionally permits abstract references to
1399  /// fields, such as a SIZE operator in MS-style inline assembly.
1401 
1402  /// The current context is "potentially evaluated" in C++11 terms,
1403  /// but the expression is evaluated at compile-time (like the values of
1404  /// cases in a switch statement).
1406 
1407  /// In addition of being constant evaluated, the current expression
1408  /// occurs in an immediate function context - either a consteval function
1409  /// or a consteval if function.
1411 
1412  /// The current expression is potentially evaluated at run time,
1413  /// which means that code may be generated to evaluate the value of the
1414  /// expression at run time.
1416 
1417  /// The current expression is potentially evaluated, but any
1418  /// declarations referenced inside that expression are only used if
1419  /// in fact the current expression is used.
1420  ///
1421  /// This value is used when parsing default function arguments, for which
1422  /// we would like to provide diagnostics (e.g., passing non-POD arguments
1423  /// through varargs) but do not want to mark declarations as "referenced"
1424  /// until the default argument is used.
1426  };
1427 
1428  using ImmediateInvocationCandidate = llvm::PointerIntPair<ConstantExpr *, 1>;
1429 
1430  /// Data structure used to record current or nested
1431  /// expression evaluation contexts.
1433  /// The expression evaluation context.
1435 
1436  /// Whether the enclosing context needed a cleanup.
1438 
1439  /// The number of active cleanup objects when we entered
1440  /// this expression evaluation context.
1442 
1443  /// The number of typos encountered during this expression evaluation
1444  /// context (i.e. the number of TypoExprs created).
1445  unsigned NumTypos;
1446 
1448 
1449  /// The lambdas that are present within this context, if it
1450  /// is indeed an unevaluated context.
1452 
1453  /// The declaration that provides context for lambda expressions
1454  /// and block literals if the normal declaration context does not
1455  /// suffice, e.g., in a default function argument.
1457 
1458  /// If we are processing a decltype type, a set of call expressions
1459  /// for which we have deferred checking the completeness of the return type.
1461 
1462  /// If we are processing a decltype type, a set of temporary binding
1463  /// expressions for which we have deferred checking the destructor.
1465 
1467 
1468  /// Expressions appearing as the LHS of a volatile assignment in this
1469  /// context. We produce a warning for these when popping the context if
1470  /// they are not discarded-value expressions nor unevaluated operands.
1472 
1473  /// Set of candidates for starting an immediate invocation.
1475 
1476  /// Set of DeclRefExprs referencing a consteval function when used in a
1477  /// context not already known to be immediately invoked.
1479 
1480  /// \brief Describes whether we are in an expression constext which we have
1481  /// to handle differently.
1484  } ExprContext;
1485 
1486  // A context can be nested in both a discarded statement context and
1487  // an immediate function context, so they need to be tracked independently.
1490 
1492  unsigned NumCleanupObjects,
1500 
1501  bool isUnevaluated() const {
1505  }
1506 
1507  bool isConstantEvaluated() const {
1510  }
1511 
1516  }
1517 
1520  (Context ==
1523  }
1524  };
1525 
1526  /// A stack of expression evaluation contexts.
1528 
1529  /// Emit a warning for all pending noderef expressions that we recorded.
1531 
1532  /// Compute the mangling number context for a lambda expression or
1533  /// block literal. Also return the extra mangling decl if any.
1534  ///
1535  /// \param DC - The DeclContext containing the lambda expression or
1536  /// block literal.
1537  std::tuple<MangleNumberingContext *, Decl *>
1539 
1540 
1541  /// SpecialMemberOverloadResult - The overloading result for a special member
1542  /// function.
1543  ///
1544  /// This is basically a wrapper around PointerIntPair. The lowest bits of the
1545  /// integer are used to determine whether overload resolution succeeded.
1547  public:
1548  enum Kind {
1552  };
1553 
1554  private:
1555  llvm::PointerIntPair<CXXMethodDecl *, 2> Pair;
1556 
1557  public:
1560  : Pair(MD, MD->isDeleted() ? NoMemberOrDeleted : Success) {}
1561 
1562  CXXMethodDecl *getMethod() const { return Pair.getPointer(); }
1563  void setMethod(CXXMethodDecl *MD) { Pair.setPointer(MD); }
1564 
1565  Kind getKind() const { return static_cast<Kind>(Pair.getInt()); }
1566  void setKind(Kind K) { Pair.setInt(K); }
1567  };
1568 
1570  : public llvm::FastFoldingSetNode,
1572  public:
1573  SpecialMemberOverloadResultEntry(const llvm::FoldingSetNodeID &ID)
1574  : FastFoldingSetNode(ID)
1575  {}
1576  };
1577 
1578  /// A cache of special member function overload resolution results
1579  /// for C++ records.
1580  llvm::FoldingSet<SpecialMemberOverloadResultEntry> SpecialMemberCache;
1581 
1582  /// A cache of the flags available in enumerations with the flag_bits
1583  /// attribute.
1584  mutable llvm::DenseMap<const EnumDecl*, llvm::APInt> FlagBitsCache;
1585 
1586  /// The kind of translation unit we are processing.
1587  ///
1588  /// When we're processing a complete translation unit, Sema will perform
1589  /// end-of-translation-unit semantic tasks (such as creating
1590  /// initializers for tentative definitions in C) once parsing has
1591  /// completed. Modules and precompiled headers perform different kinds of
1592  /// checks.
1594 
1595  llvm::BumpPtrAllocator BumpAlloc;
1596 
1597  /// The number of SFINAE diagnostics that have been trapped.
1599 
1600  typedef llvm::DenseMap<ParmVarDecl *, llvm::TinyPtrVector<ParmVarDecl *>>
1602 
1603  /// A mapping from parameters with unparsed default arguments to the
1604  /// set of instantiations of each parameter.
1605  ///
1606  /// This mapping is a temporary data structure used when parsing
1607  /// nested class templates or nested classes of class templates,
1608  /// where we might end up instantiating an inner class before the
1609  /// default arguments of its methods have been parsed.
1611 
1612  // Contains the locations of the beginning of unparsed default
1613  // argument locations.
1614  llvm::DenseMap<ParmVarDecl *, SourceLocation> UnparsedDefaultArgLocs;
1615 
1616  /// UndefinedInternals - all the used, undefined objects which require a
1617  /// definition in this translation unit.
1618  llvm::MapVector<NamedDecl *, SourceLocation> UndefinedButUsed;
1619 
1620  /// Determine if VD, which must be a variable or function, is an external
1621  /// symbol that nonetheless can't be referenced from outside this translation
1622  /// unit because its type has no linkage and it's not extern "C".
1624 
1625  /// Obtain a sorted list of functions that are undefined but ODR-used.
1626  void getUndefinedButUsed(
1627  SmallVectorImpl<std::pair<NamedDecl *, SourceLocation> > &Undefined);
1628 
1629  /// Retrieves list of suspicious delete-expressions that will be checked at
1630  /// the end of translation unit.
1631  const llvm::MapVector<FieldDecl *, DeleteLocs> &
1633 
1635  public:
1636  using Lists = std::pair<ObjCMethodList, ObjCMethodList>;
1637  using iterator = llvm::DenseMap<Selector, Lists>::iterator;
1638  iterator begin() { return Methods.begin(); }
1639  iterator end() { return Methods.end(); }
1640  iterator find(Selector Sel) { return Methods.find(Sel); }
1641  std::pair<iterator, bool> insert(std::pair<Selector, Lists> &&Val) {
1642  return Methods.insert(Val);
1643  }
1644  int count(Selector Sel) const { return Methods.count(Sel); }
1645  bool empty() const { return Methods.empty(); }
1646 
1647  private:
1648  llvm::DenseMap<Selector, Lists> Methods;
1649  };
1650 
1651  /// Method Pool - allows efficient lookup when typechecking messages to "id".
1652  /// We need to maintain a list, since selectors can have differing signatures
1653  /// across classes. In Cocoa, this happens to be extremely uncommon (only 1%
1654  /// of selectors are "overloaded").
1655  /// At the head of the list it is recorded whether there were 0, 1, or >= 2
1656  /// methods inside categories with a particular selector.
1658 
1659  /// Method selectors used in a \@selector expression. Used for implementation
1660  /// of -Wselector.
1661  llvm::MapVector<Selector, SourceLocation> ReferencedSelectors;
1662 
1663  /// List of SourceLocations where 'self' is implicitly retained inside a
1664  /// block.
1667 
1668  /// Kinds of C++ special members.
1677  };
1678 
1679  typedef llvm::PointerIntPair<CXXRecordDecl *, 3, CXXSpecialMember>
1681 
1682  /// The C++ special members which we are currently in the process of
1683  /// declaring. If this process recursively triggers the declaration of the
1684  /// same special member, we should act as if it is not yet declared.
1686 
1687  /// Kinds of defaulted comparison operator functions.
1688  enum class DefaultedComparisonKind : unsigned char {
1689  /// This is not a defaultable comparison operator.
1690  None,
1691  /// This is an operator== that should be implemented as a series of
1692  /// subobject comparisons.
1693  Equal,
1694  /// This is an operator<=> that should be implemented as a series of
1695  /// subobject comparisons.
1696  ThreeWay,
1697  /// This is an operator!= that should be implemented as a rewrite in terms
1698  /// of a == comparison.
1699  NotEqual,
1700  /// This is an <, <=, >, or >= that should be implemented as a rewrite in
1701  /// terms of a <=> comparison.
1702  Relational,
1703  };
1704 
1705  /// The function definitions which were renamed as part of typo-correction
1706  /// to match their respective declarations. We want to keep track of them
1707  /// to ensure that we don't emit a "redefinition" error if we encounter a
1708  /// correctly named definition after the renamed definition.
1710 
1711  /// Stack of types that correspond to the parameter entities that are
1712  /// currently being copy-initialized. Can be empty.
1714 
1715  void ReadMethodPool(Selector Sel);
1717 
1718  /// Private Helper predicate to check for 'self'.
1719  bool isSelfExpr(Expr *RExpr);
1720  bool isSelfExpr(Expr *RExpr, const ObjCMethodDecl *Method);
1721 
1722  /// Cause the active diagnostic on the DiagosticsEngine to be
1723  /// emitted. This is closely coupled to the SemaDiagnosticBuilder class and
1724  /// should not be used elsewhere.
1725  void EmitCurrentDiagnostic(unsigned DiagID);
1726 
1727  /// Records and restores the CurFPFeatures state on entry/exit of compound
1728  /// statements.
1730  public:
1733  FPOptionsOverride getOverrides() { return OldOverrides; }
1734 
1735  private:
1736  Sema& S;
1737  FPOptions OldFPFeaturesState;
1738  FPOptionsOverride OldOverrides;
1739  LangOptions::FPEvalMethodKind OldEvalMethod;
1740  SourceLocation OldFPPragmaLocation;
1741  };
1742 
1743  void addImplicitTypedef(StringRef Name, QualType T);
1744 
1745  bool WarnedStackExhausted = false;
1746 
1747  /// Increment when we find a reference; decrement when we find an ignored
1748  /// assignment. Ultimately the value is 0 if every reference is an ignored
1749  /// assignment.
1750  llvm::DenseMap<const VarDecl *, int> RefsMinusAssignments;
1751 
1752 private:
1753  Optional<std::unique_ptr<DarwinSDKInfo>> CachedDarwinSDKInfo;
1754 
1755  bool WarnedDarwinSDKInfoMissing = false;
1756 
1757 public:
1758  Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
1760  CodeCompleteConsumer *CompletionConsumer = nullptr);
1761  ~Sema();
1762 
1763  /// Perform initialization that occurs after the parser has been
1764  /// initialized but before it parses anything.
1765  void Initialize();
1766 
1767  /// This virtual key function only exists to limit the emission of debug info
1768  /// describing the Sema class. GCC and Clang only emit debug info for a class
1769  /// with a vtable when the vtable is emitted. Sema is final and not
1770  /// polymorphic, but the debug info size savings are so significant that it is
1771  /// worth adding a vtable just to take advantage of this optimization.
1772  virtual void anchor();
1773 
1774  const LangOptions &getLangOpts() const { return LangOpts; }
1777 
1780  Preprocessor &getPreprocessor() const { return PP; }
1781  ASTContext &getASTContext() const { return Context; }
1782  ASTConsumer &getASTConsumer() const { return Consumer; }
1784  ExternalSemaSource* getExternalSource() const { return ExternalSource; }
1785 
1787  StringRef Platform);
1789 
1790  ///Registers an external source. If an external source already exists,
1791  /// creates a multiplex external source and appends to it.
1792  ///
1793  ///\param[in] E - A non-null external sema source.
1794  ///
1796 
1797  void PrintStats() const;
1798 
1799  /// Warn that the stack is nearly exhausted.
1801 
1802  /// Run some code with "sufficient" stack space. (Currently, at least 256K is
1803  /// guaranteed). Produces a warning if we're low on stack space and allocates
1804  /// more in that case. Use this in code that may recurse deeply (for example,
1805  /// in template instantiation) to avoid stack overflow.
1807  llvm::function_ref<void()> Fn);
1808 
1809  /// Helper class that creates diagnostics with optional
1810  /// template instantiation stacks.
1811  ///
1812  /// This class provides a wrapper around the basic DiagnosticBuilder
1813  /// class that emits diagnostics. ImmediateDiagBuilder is
1814  /// responsible for emitting the diagnostic (as DiagnosticBuilder
1815  /// does) and, if the diagnostic comes from inside a template
1816  /// instantiation, printing the template instantiation stack as
1817  /// well.
1819  Sema &SemaRef;
1820  unsigned DiagID;
1821 
1822  public:
1823  ImmediateDiagBuilder(DiagnosticBuilder &DB, Sema &SemaRef, unsigned DiagID)
1824  : DiagnosticBuilder(DB), SemaRef(SemaRef), DiagID(DiagID) {}
1825  ImmediateDiagBuilder(DiagnosticBuilder &&DB, Sema &SemaRef, unsigned DiagID)
1826  : DiagnosticBuilder(DB), SemaRef(SemaRef), DiagID(DiagID) {}
1827 
1828  // This is a cunning lie. DiagnosticBuilder actually performs move
1829  // construction in its copy constructor (but due to varied uses, it's not
1830  // possible to conveniently express this as actual move construction). So
1831  // the default copy ctor here is fine, because the base class disables the
1832  // source anyway, so the user-defined ~ImmediateDiagBuilder is a safe no-op
1833  // in that case anwyay.
1834  ImmediateDiagBuilder(const ImmediateDiagBuilder &) = default;
1835 
1837  // If we aren't active, there is nothing to do.
1838  if (!isActive()) return;
1839 
1840  // Otherwise, we need to emit the diagnostic. First clear the diagnostic
1841  // builder itself so it won't emit the diagnostic in its own destructor.
1842  //
1843  // This seems wasteful, in that as written the DiagnosticBuilder dtor will
1844  // do its own needless checks to see if the diagnostic needs to be
1845  // emitted. However, because we take care to ensure that the builder
1846  // objects never escape, a sufficiently smart compiler will be able to
1847  // eliminate that code.
1848  Clear();
1849 
1850  // Dispatch to Sema to emit the diagnostic.
1851  SemaRef.EmitCurrentDiagnostic(DiagID);
1852  }
1853 
1854  /// Teach operator<< to produce an object of the correct type.
1855  template <typename T>
1856  friend const ImmediateDiagBuilder &
1858  const DiagnosticBuilder &BaseDiag = Diag;
1859  BaseDiag << Value;
1860  return Diag;
1861  }
1862 
1863  // It is necessary to limit this to rvalue reference to avoid calling this
1864  // function with a bitfield lvalue argument since non-const reference to
1865  // bitfield is not allowed.
1866  template <typename T, typename = typename std::enable_if<
1867  !std::is_lvalue_reference<T>::value>::type>
1868  const ImmediateDiagBuilder &operator<<(T &&V) const {
1869  const DiagnosticBuilder &BaseDiag = *this;
1870  BaseDiag << std::move(V);
1871  return *this;
1872  }
1873  };
1874 
1875  /// Bitmask to contain the list of reasons a single diagnostic should be
1876  /// emitted, based on its language. This permits multiple offload systems
1877  /// to coexist in the same translation unit.
1879  /// Diagnostic doesn't apply to anything. Included for completeness, but
1880  /// should make this a no-op.
1881  None = 0,
1882  /// OpenMP specific diagnostic.
1883  OmpDevice = 1 << 0,
1884  OmpHost = 1 << 1,
1885  OmpAll = OmpDevice | OmpHost,
1886  /// CUDA specific diagnostics.
1887  CudaDevice = 1 << 2,
1888  CudaHost = 1 << 3,
1890  /// SYCL specific diagnostic.
1891  Sycl = 1 << 4,
1892  /// ESIMD specific diagnostic.
1893  Esimd = 1 << 5,
1894  /// A flag representing 'all'. This can be used to avoid the check
1895  /// all-together and make this behave as it did before the
1896  /// DiagnosticReason was added (that is, unconditionally emit).
1897  /// Note: This needs to be updated if any flags above are added.
1898  All = OmpAll | CudaAll | Sycl | Esimd,
1899 
1900  LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/All)
1901  };
1902 
1903 private:
1904  // A collection of a pair of undefined functions and their callers known
1905  // to be reachable from a routine on the device (kernel or device function).
1906  typedef std::pair<const FunctionDecl *, const FunctionDecl *> CallPair;
1907  llvm::SmallVector<CallPair> UndefinedReachableFromSyclDevice;
1908 
1909 public:
1910  // Helper routine to add a pair of Callee-Caller pair of FunctionDecl *
1911  // to UndefinedReachableFromSyclDevice.
1913  const FunctionDecl *Caller) {
1914  UndefinedReachableFromSyclDevice.push_back(std::make_pair(Callee, Caller));
1915  }
1916  // Helper routine to check if a pair of Callee-Caller FunctionDecl *
1917  // is in UndefinedReachableFromSyclDevice.
1919  const FunctionDecl *Caller) {
1920  return llvm::any_of(UndefinedReachableFromSyclDevice,
1921  [Callee, Caller](const CallPair &P) {
1922  return P.first == Callee && P.second == Caller;
1923  });
1924  }
1925 
1926  /// A generic diagnostic builder for errors which may or may not be deferred.
1927  ///
1928  /// In CUDA, there exist constructs (e.g. variable-length arrays, try/catch)
1929  /// which are not allowed to appear inside __device__ functions and are
1930  /// allowed to appear in __host__ __device__ functions only if the host+device
1931  /// function is never codegen'ed.
1932  ///
1933  /// To handle this, we use the notion of "deferred diagnostics", where we
1934  /// attach a diagnostic to a FunctionDecl that's emitted iff it's codegen'ed.
1935  ///
1936  /// This class lets you emit either a regular diagnostic, a deferred
1937  /// diagnostic, or no diagnostic at all, according to an argument you pass to
1938  /// its constructor, thus simplifying the process of creating these "maybe
1939  /// deferred" diagnostics.
1941  public:
1942  enum Kind {
1943  /// Emit no diagnostics.
1945  /// Emit the diagnostic immediately (i.e., behave like Sema::Diag()).
1947  /// Emit the diagnostic immediately, and, if it's a warning or error, also
1948  /// emit a call stack showing how this function can be reached by an a
1949  /// priori known-emitted function.
1951  /// Create a deferred diagnostic, which is emitted only if the function
1952  /// it's attached to is codegen'ed. Also emit a call stack as with
1953  /// K_ImmediateWithCallStack.
1955  };
1956 
1957  SemaDiagnosticBuilder(Kind K, SourceLocation Loc, unsigned DiagID,
1960  SemaDiagnosticBuilder(const SemaDiagnosticBuilder &) = default;
1962 
1963  bool isImmediate() const { return ImmediateDiag.hasValue(); }
1964 
1965  /// Convertible to bool: True if we immediately emitted an error, false if
1966  /// we didn't emit an error or we created a deferred error.
1967  ///
1968  /// Example usage:
1969  ///
1970  /// if (SemaDiagnosticBuilder(...) << foo << bar)
1971  /// return ExprError();
1972  ///
1973  /// But see CUDADiagIfDeviceCode() and CUDADiagIfHostCode() -- you probably
1974  /// want to use these instead of creating a SemaDiagnosticBuilder yourself.
1975  operator bool() const { return isImmediate(); }
1976 
1977  template <typename T>
1978  friend const SemaDiagnosticBuilder &
1980  if (Diag.ImmediateDiag.hasValue())
1981  *Diag.ImmediateDiag << Value;
1982  else if (Diag.PartialDiagId.hasValue())
1983  Diag.S.DeviceDeferredDiags[Diag.Fn][*Diag.PartialDiagId]
1984  .getDiag()
1985  .second
1986  << Value;
1987  return Diag;
1988  }
1989 
1990  // It is necessary to limit this to rvalue reference to avoid calling this
1991  // function with a bitfield lvalue argument since non-const reference to
1992  // bitfield is not allowed.
1993  template <typename T, typename = typename std::enable_if<
1994  !std::is_lvalue_reference<T>::value>::type>
1995  const SemaDiagnosticBuilder &operator<<(T &&V) const {
1996  if (ImmediateDiag.hasValue())
1997  *ImmediateDiag << std::move(V);
1998  else if (PartialDiagId.hasValue())
1999  S.DeviceDeferredDiags[Fn][*PartialDiagId].getDiag().second
2000  << std::move(V);
2001  return *this;
2002  }
2003 
2004  friend const SemaDiagnosticBuilder &
2006  if (Diag.ImmediateDiag.hasValue())
2007  PD.Emit(*Diag.ImmediateDiag);
2008  else if (Diag.PartialDiagId.hasValue())
2009  Diag.S.DeviceDeferredDiags[Diag.Fn][*Diag.PartialDiagId]
2010  .getDiag()
2011  .second = PD;
2012  return Diag;
2013  }
2014 
2015  void AddFixItHint(const FixItHint &Hint) const {
2016  if (ImmediateDiag.hasValue())
2017  ImmediateDiag->AddFixItHint(Hint);
2018  else if (PartialDiagId.hasValue())
2019  S.DeviceDeferredDiags[Fn][*PartialDiagId].getDiag().second.AddFixItHint(
2020  Hint);
2021  }
2022 
2024  return ExprError();
2025  }
2027  return StmtError();
2028  }
2029  operator ExprResult() const { return ExprError(); }
2030  operator StmtResult() const { return StmtError(); }
2031  operator TypeResult() const { return TypeError(); }
2032  operator DeclResult() const { return DeclResult(true); }
2033  operator MemInitResult() const { return MemInitResult(true); }
2034 
2035  private:
2036  Sema &S;
2037  SourceLocation Loc;
2038  unsigned DiagID;
2039  FunctionDecl *Fn;
2040  bool ShowCallStack;
2041 
2042  // Invariant: At most one of these Optionals has a value.
2043  // FIXME: Switch these to a Variant once that exists.
2045  llvm::Optional<unsigned> PartialDiagId;
2046  };
2047 
2048  /// Is the last error level diagnostic immediate. This is used to determined
2049  /// whether the next info diagnostic should be immediate.
2051 
2052  /// Emit a diagnostic.
2053  SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID,
2054  bool DeferHint = false);
2055 
2056  /// Emit a partial diagnostic.
2058  bool DeferHint = false);
2059 
2060  /// Build a partial diagnostic.
2061  PartialDiagnostic PDiag(unsigned DiagID = 0); // in SemaInternal.h
2062 
2063  /// Whether deferrable diagnostics should be deferred.
2064  bool DeferDiags = false;
2065 
2066  /// RAII class to control scope of DeferDiags.
2068  Sema &S;
2069  bool SavedDeferDiags = false;
2070 
2071  public:
2073  : S(S), SavedDeferDiags(S.DeferDiags) {
2074  S.DeferDiags = DeferDiags;
2075  }
2076  ~DeferDiagsRAII() { S.DeferDiags = SavedDeferDiags; }
2077  };
2078 
2079  /// Whether uncompilable error has occurred. This includes error happens
2080  /// in deferred diagnostics.
2081  bool hasUncompilableErrorOccurred() const;
2082 
2083  bool findMacroSpelling(SourceLocation &loc, StringRef name);
2084 
2085  /// Get a string to suggest for zero-initialization of a type.
2086  std::string
2089 
2090  /// Calls \c Lexer::getLocForEndOfToken()
2092 
2093  /// Retrieve the module loader associated with the preprocessor.
2094  ModuleLoader &getModuleLoader() const;
2095 
2096  /// Invent a new identifier for parameters of abbreviated templates.
2097  IdentifierInfo *
2099  unsigned Index);
2100 
2102 
2103  private:
2104  /// Function or variable declarations to be checked for whether the deferred
2105  /// diagnostics should be emitted.
2106  llvm::SmallSetVector<Decl *, 4> DeclsToCheckForDeferredDiags;
2107 
2108  public:
2109  // Emit all deferred diagnostics.
2110  void emitDeferredDiags();
2111 
2113  /// The global module fragment, between 'module;' and a module-declaration.
2115  /// A normal translation unit fragment. For a non-module unit, this is the
2116  /// entire translation unit. Otherwise, it runs from the module-declaration
2117  /// to the private-module-fragment (if any) or the end of the TU (if not).
2119  /// The private module fragment, between 'module :private;' and the end of
2120  /// the translation unit.
2122  };
2123 
2127 
2129 
2131 
2132  void PushFunctionScope();
2133  void PushBlockScope(Scope *BlockScope, BlockDecl *Block);
2135 
2136  /// This is used to inform Sema what the current TemplateParameterDepth
2137  /// is during Parsing. Currently it is used to pass on the depth
2138  /// when parsing generic lambda 'auto' parameters.
2140 
2141  void PushCapturedRegionScope(Scope *RegionScope, CapturedDecl *CD,
2143  unsigned OpenMPCaptureLevel = 0);
2144 
2145  /// Custom deleter to allow FunctionScopeInfos to be kept alive for a short
2146  /// time after they've been popped.
2148  Sema *Self;
2149 
2150  public:
2151  explicit PoppedFunctionScopeDeleter(Sema *Self) : Self(Self) {}
2153  };
2154 
2155  using PoppedFunctionScopePtr =
2156  std::unique_ptr<sema::FunctionScopeInfo, PoppedFunctionScopeDeleter>;
2157 
2160  const Decl *D = nullptr,
2161  QualType BlockType = QualType());
2162 
2164  return FunctionScopes.empty() ? nullptr : FunctionScopes.back();
2165  }
2166 
2168 
2172  void setFunctionHasMustTail();
2173 
2174  void PushCompoundScope(bool IsStmtExpr);
2175  void PopCompoundScope();
2176 
2178 
2180 
2181  /// Retrieve the current block, if any.
2183 
2184  /// Get the innermost lambda enclosing the current location, if any. This
2185  /// looks through intervening non-lambda scopes such as local functions and
2186  /// blocks.
2188 
2189  /// Retrieve the current lambda scope info, if any.
2190  /// \param IgnoreNonLambdaCapturingScope true if should find the top-most
2191  /// lambda scope info ignoring all inner capturing scopes that are not
2192  /// lambda scopes.
2194  getCurLambda(bool IgnoreNonLambdaCapturingScope = false);
2195 
2196  /// Retrieve the current generic lambda info, if any.
2198 
2199  /// Retrieve the current captured region, if any.
2201 
2202  /// Retrieve the current function, if any, that should be analyzed for
2203  /// potential availability violations.
2205 
2206  /// WeakTopLevelDeclDecls - access to \#pragma weak-generated Decls
2208 
2209  /// Called before parsing a function declarator belonging to a function
2210  /// declaration.
2212  unsigned TemplateParameterDepth);
2213 
2214  /// Called after parsing a function declarator belonging to a function
2215  /// declaration.
2217 
2218  void ActOnComment(SourceRange Comment);
2219 
2220  //===--------------------------------------------------------------------===//
2221  // Type Analysis / Processing: SemaType.cpp.
2222  //
2223 
2225  const DeclSpec *DS = nullptr);
2226  QualType BuildQualifiedType(QualType T, SourceLocation Loc, unsigned CVRA,
2227  const DeclSpec *DS = nullptr);
2229  SourceLocation Loc, DeclarationName Entity);
2230  QualType BuildReferenceType(QualType T, bool LValueRef,
2231  SourceLocation Loc, DeclarationName Entity);
2233  Expr *ArraySize, unsigned Quals,
2234  SourceRange Brackets, DeclarationName Entity);
2235  QualType BuildVectorType(QualType T, Expr *VecSize, SourceLocation AttrLoc);
2236  QualType BuildExtVectorType(QualType T, Expr *ArraySize,
2237  SourceLocation AttrLoc);
2238  QualType BuildMatrixType(QualType T, Expr *NumRows, Expr *NumColumns,
2239  SourceLocation AttrLoc);
2240 
2241  QualType BuildAddressSpaceAttr(QualType &T, LangAS ASIdx, Expr *AddrSpace,
2242  SourceLocation AttrLoc);
2243 
2244  /// Same as above, but constructs the AddressSpace index if not provided.
2246  SourceLocation AttrLoc);
2247  SYCLIntelFPGAIVDepAttr *
2249  Expr *Expr2);
2250  LoopUnrollHintAttr *BuildLoopUnrollHintAttr(const AttributeCommonInfo &A,
2251  Expr *E);
2252  OpenCLUnrollHintAttr *
2254 
2255  SYCLIntelFPGALoopCountAttr *
2257  SYCLIntelFPGAInitiationIntervalAttr *
2259  Expr *E);
2260  SYCLIntelFPGAMaxConcurrencyAttr *
2262  SYCLIntelFPGAMaxInterleavingAttr *
2264  SYCLIntelFPGASpeculatedIterationsAttr *
2266  Expr *E);
2267  SYCLIntelFPGALoopCoalesceAttr *
2269 
2271 
2273 
2274  /// Build a function type.
2275  ///
2276  /// This routine checks the function type according to C++ rules and
2277  /// under the assumption that the result type and parameter types have
2278  /// just been instantiated from a template. It therefore duplicates
2279  /// some of the behavior of GetTypeForDeclarator, but in a much
2280  /// simpler form that is only suitable for this narrow use case.
2281  ///
2282  /// \param T The return type of the function.
2283  ///
2284  /// \param ParamTypes The parameter types of the function. This array
2285  /// will be modified to account for adjustments to the types of the
2286  /// function parameters.
2287  ///
2288  /// \param Loc The location of the entity whose type involves this
2289  /// function type or, if there is no such entity, the location of the
2290  /// type that will have function type.
2291  ///
2292  /// \param Entity The name of the entity that involves the function
2293  /// type, if known.
2294  ///
2295  /// \param EPI Extra information about the function type. Usually this will
2296  /// be taken from an existing function with the same prototype.
2297  ///
2298  /// \returns A suitable function type, if there are no errors. The
2299  /// unqualified type will always be a FunctionProtoType.
2300  /// Otherwise, returns a NULL type.
2302  MutableArrayRef<QualType> ParamTypes,
2303  SourceLocation Loc, DeclarationName Entity,
2304  const FunctionProtoType::ExtProtoInfo &EPI);
2305 
2307  SourceLocation Loc,
2308  DeclarationName Entity);
2310  SourceLocation Loc, DeclarationName Entity);
2314  SourceLocation Loc);
2316  SourceLocation Loc);
2317  QualType BuildBitIntType(bool IsUnsigned, Expr *BitWidth, SourceLocation Loc);
2318 
2321 
2322  /// Package the given type and TSI into a ParsedType.
2327  TypeSourceInfo **TInfo = nullptr);
2328  CanThrowResult canThrow(const Stmt *E);
2329  /// Determine whether the callee of a particular function call can throw.
2330  /// E, D and Loc are all optional.
2331  static CanThrowResult canCalleeThrow(Sema &S, const Expr *E, const Decl *D,
2332  SourceLocation Loc = SourceLocation());
2334  const FunctionProtoType *FPT);
2341  const FunctionProtoType *Old, SourceLocation OldLoc,
2342  const FunctionProtoType *New, SourceLocation NewLoc);
2344  const PartialDiagnostic &DiagID, const PartialDiagnostic & NoteID,
2345  const FunctionProtoType *Old, SourceLocation OldLoc,
2346  const FunctionProtoType *New, SourceLocation NewLoc);
2347  bool handlerCanCatch(QualType HandlerType, QualType ExceptionType);
2348  bool CheckExceptionSpecSubset(const PartialDiagnostic &DiagID,
2349  const PartialDiagnostic &NestedDiagID,
2350  const PartialDiagnostic &NoteID,
2351  const PartialDiagnostic &NoThrowDiagID,
2352  const FunctionProtoType *Superset,
2353  SourceLocation SuperLoc,
2354  const FunctionProtoType *Subset,
2355  SourceLocation SubLoc);
2356  bool CheckParamExceptionSpec(const PartialDiagnostic &NestedDiagID,
2357  const PartialDiagnostic &NoteID,
2358  const FunctionProtoType *Target,
2359  SourceLocation TargetLoc,
2360  const FunctionProtoType *Source,
2361  SourceLocation SourceLoc);
2362 
2364 
2365  /// The parser has parsed the context-sensitive type 'instancetype'
2366  /// in an Objective-C message declaration. Return the appropriate type.
2368 
2369  /// Abstract class used to diagnose incomplete types.
2370  struct TypeDiagnoser {
2372 
2373  virtual void diagnose(Sema &S, SourceLocation Loc, QualType T) = 0;
2374  virtual ~TypeDiagnoser() {}
2375  };
2376 
2377  static int getPrintable(int I) { return I; }
2378  static unsigned getPrintable(unsigned I) { return I; }
2379  static bool getPrintable(bool B) { return B; }
2380  static const char * getPrintable(const char *S) { return S; }
2381  static StringRef getPrintable(StringRef S) { return S; }
2382  static const std::string &getPrintable(const std::string &S) { return S; }
2383  static const IdentifierInfo *getPrintable(const IdentifierInfo *II) {
2384  return II;
2385  }
2387  static QualType getPrintable(QualType T) { return T; }
2388  static SourceRange getPrintable(SourceRange R) { return R; }
2389  static SourceRange getPrintable(SourceLocation L) { return L; }
2390  static SourceRange getPrintable(const Expr *E) { return E->getSourceRange(); }
2391  static SourceRange getPrintable(TypeLoc TL) { return TL.getSourceRange();}
2392 
2393  template <typename... Ts> class BoundTypeDiagnoser : public TypeDiagnoser {
2394  protected:
2395  unsigned DiagID;
2396  std::tuple<const Ts &...> Args;
2397 
2398  template <std::size_t... Is>
2399  void emit(const SemaDiagnosticBuilder &DB,
2400  std::index_sequence<Is...>) const {
2401  // Apply all tuple elements to the builder in order.
2402  bool Dummy[] = {false, (DB << getPrintable(std::get<Is>(Args)))...};
2403  (void)Dummy;
2404  }
2405 
2406  public:
2407  BoundTypeDiagnoser(unsigned DiagID, const Ts &...Args)
2408  : TypeDiagnoser(), DiagID(DiagID), Args(Args...) {
2409  assert(DiagID != 0 && "no diagnostic for type diagnoser");
2410  }
2411 
2412  void diagnose(Sema &S, SourceLocation Loc, QualType T) override {
2413  const SemaDiagnosticBuilder &DB = S.Diag(Loc, DiagID);
2414  emit(DB, std::index_sequence_for<Ts...>());
2415  DB << T;
2416  }
2417  };
2418 
2419  /// Do a check to make sure \p Name looks like a legal argument for the
2420  /// swift_name attribute applied to decl \p D. Raise a diagnostic if the name
2421  /// is invalid for the given declaration.
2422  ///
2423  /// \p AL is used to provide caret diagnostics in case of a malformed name.
2424  ///
2425  /// \returns true if the name is a valid swift name for \p D, false otherwise.
2426  bool DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc,
2427  const ParsedAttr &AL, bool IsAsync);
2428 
2429  /// A derivative of BoundTypeDiagnoser for which the diagnostic's type
2430  /// parameter is preceded by a 0/1 enum that is 1 if the type is sizeless.
2431  /// For example, a diagnostic with no other parameters would generally have
2432  /// the form "...%select{incomplete|sizeless}0 type %1...".
2433  template <typename... Ts>
2435  public:
2436  SizelessTypeDiagnoser(unsigned DiagID, const Ts &... Args)
2437  : BoundTypeDiagnoser<Ts...>(DiagID, Args...) {}
2438 
2439  void diagnose(Sema &S, SourceLocation Loc, QualType T) override {
2440  const SemaDiagnosticBuilder &DB = S.Diag(Loc, this->DiagID);
2441  this->emit(DB, std::index_sequence_for<Ts...>());
2442  DB << T->isSizelessType() << T;
2443  }
2444  };
2445 
2446  enum class CompleteTypeKind {
2447  /// Apply the normal rules for complete types. In particular,
2448  /// treat all sizeless types as incomplete.
2449  Normal,
2450 
2451  /// Relax the normal rules for complete types so that they include
2452  /// sizeless built-in types.
2454 
2455  // FIXME: Eventually we should flip the default to Normal and opt in
2456  // to AcceptSizeless rather than opt out of it.
2458  };
2459 
2460 private:
2461  /// Methods for marking which expressions involve dereferencing a pointer
2462  /// marked with the 'noderef' attribute. Expressions are checked bottom up as
2463  /// they are parsed, meaning that a noderef pointer may not be accessed. For
2464  /// example, in `&*p` where `p` is a noderef pointer, we will first parse the
2465  /// `*p`, but need to check that `address of` is called on it. This requires
2466  /// keeping a container of all pending expressions and checking if the address
2467  /// of them are eventually taken.
2468  void CheckSubscriptAccessOfNoDeref(const ArraySubscriptExpr *E);
2469  void CheckAddressOfNoDeref(const Expr *E);
2470  void CheckMemberAccessOfNoDeref(const MemberExpr *E);
2471 
2472  bool RequireCompleteTypeImpl(SourceLocation Loc, QualType T,
2473  CompleteTypeKind Kind, TypeDiagnoser *Diagnoser);
2474 
2475  struct ModuleScope {
2476  SourceLocation BeginLoc;
2477  clang::Module *Module = nullptr;
2478  bool ModuleInterface = false;
2479  bool IsPartition = false;
2480  bool ImplicitGlobalModuleFragment = false;
2481  VisibleModuleSet OuterVisibleModules;
2482  };
2483  /// The modules we're currently parsing.
2485  /// The global module fragment of the current translation unit.
2486  clang::Module *GlobalModuleFragment = nullptr;
2487 
2488  /// The modules we imported directly.
2489  llvm::SmallPtrSet<clang::Module *, 8> DirectModuleImports;
2490 
2491  /// Namespace definitions that we will export when they finish.
2492  llvm::SmallPtrSet<const NamespaceDecl*, 8> DeferredExportedNamespaces;
2493 
2494  /// Get the module whose scope we are currently within.
2495  Module *getCurrentModule() const {
2496  return ModuleScopes.empty() ? nullptr : ModuleScopes.back().Module;
2497  }
2498 
2499  /// Helper function to judge if we are in module purview.
2500  /// Return false if we are not in a module.
2501  bool isCurrentModulePurview() const {
2502  return getCurrentModule() ? getCurrentModule()->isModulePurview() : false;
2503  }
2504 
2505  /// Enter the scope of the global module.
2506  Module *PushGlobalModuleFragment(SourceLocation BeginLoc, bool IsImplicit);
2507  /// Leave the scope of the global module.
2508  void PopGlobalModuleFragment();
2509 
2510  VisibleModuleSet VisibleModules;
2511 
2512 public:
2513  /// Get the module owning an entity.
2514  Module *getOwningModule(const Decl *Entity) {
2515  return Entity->getOwningModule();
2516  }
2517 
2519  return DirectModuleImports.contains(M);
2520  }
2521 
2522  /// Make a merged definition of an existing hidden definition \p ND
2523  /// visible at the specified location.
2525 
2526  bool isModuleVisible(const Module *M, bool ModulePrivate = false);
2527 
2528  // When loading a non-modular PCH files, this is used to restore module
2529  // visibility.
2530  void makeModuleVisible(Module *Mod, SourceLocation ImportLoc) {
2531  VisibleModules.setVisible(Mod, ImportLoc);
2532  }
2533 
2534  /// Determine whether a declaration is visible to name lookup.
2535  bool isVisible(const NamedDecl *D) {
2536  return D->isUnconditionallyVisible() || isVisibleSlow(D);
2537  }
2538 
2539  /// Determine whether any declaration of an entity is visible.
2540  bool
2542  llvm::SmallVectorImpl<Module *> *Modules = nullptr) {
2543  return isVisible(D) || hasVisibleDeclarationSlow(D, Modules);
2544  }
2545  bool hasVisibleDeclarationSlow(const NamedDecl *D,
2547 
2550 
2551  /// Determine if \p D and \p Suggested have a structurally compatible
2552  /// layout as described in C11 6.2.7/1.
2553  bool hasStructuralCompatLayout(Decl *D, Decl *Suggested);
2554 
2555  /// Determine if \p D has a visible definition. If not, suggest a declaration
2556  /// that should be made visible to expose the definition.
2557  bool hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested,
2558  bool OnlyNeedComplete = false);
2560  NamedDecl *Hidden;
2561  return hasVisibleDefinition(const_cast<NamedDecl*>(D), &Hidden);
2562  }
2563 
2564  /// Determine if the template parameter \p D has a visible default argument.
2565  bool
2567  llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2568 
2569  /// Determine if there is a visible declaration of \p D that is an explicit
2570  /// specialization declaration for a specialization of a template. (For a
2571  /// member specialization, use hasVisibleMemberSpecialization.)
2573  const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2574 
2575  /// Determine if there is a visible declaration of \p D that is a member
2576  /// specialization declaration (as opposed to an instantiated declaration).
2578  const NamedDecl *D, llvm::SmallVectorImpl<Module *> *Modules = nullptr);
2579 
2580  /// Determine if \p A and \p B are equivalent internal linkage declarations
2581  /// from different modules, and thus an ambiguity error can be downgraded to
2582  /// an extension warning.
2584  const NamedDecl *B);
2586  SourceLocation Loc, const NamedDecl *D,
2588 
2590 
2593  return !RequireCompleteTypeImpl(Loc, T, Kind, nullptr);
2594  }
2596  CompleteTypeKind Kind, TypeDiagnoser &Diagnoser);
2598  CompleteTypeKind Kind, unsigned DiagID);
2599 
2601  TypeDiagnoser &Diagnoser) {
2602  return RequireCompleteType(Loc, T, CompleteTypeKind::Default, Diagnoser);
2603  }
2604  bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID) {
2605  return RequireCompleteType(Loc, T, CompleteTypeKind::Default, DiagID);
2606  }
2607 
2608  template <typename... Ts>
2609  bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID,
2610  const Ts &...Args) {
2611  BoundTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2612  return RequireCompleteType(Loc, T, Diagnoser);
2613  }
2614 
2615  template <typename... Ts>
2616  bool RequireCompleteSizedType(SourceLocation Loc, QualType T, unsigned DiagID,
2617  const Ts &... Args) {
2618  SizelessTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2619  return RequireCompleteType(Loc, T, CompleteTypeKind::Normal, Diagnoser);
2620  }
2621 
2622  /// Get the type of expression E, triggering instantiation to complete the
2623  /// type if necessary -- that is, if the expression refers to a templated
2624  /// static data member of incomplete array type.
2625  ///
2626  /// May still return an incomplete type if instantiation was not possible or
2627  /// if the type is incomplete for a different reason. Use
2628  /// RequireCompleteExprType instead if a diagnostic is expected for an
2629  /// incomplete expression type.
2631 
2632  void completeExprArrayBound(Expr *E);
2634  TypeDiagnoser &Diagnoser);
2635  bool RequireCompleteExprType(Expr *E, unsigned DiagID);
2636 
2637  template <typename... Ts>
2638  bool RequireCompleteExprType(Expr *E, unsigned DiagID, const Ts &...Args) {
2639  BoundTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2640  return RequireCompleteExprType(E, CompleteTypeKind::Default, Diagnoser);
2641  }
2642 
2643  template <typename... Ts>
2644  bool RequireCompleteSizedExprType(Expr *E, unsigned DiagID,
2645  const Ts &... Args) {
2646  SizelessTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2647  return RequireCompleteExprType(E, CompleteTypeKind::Normal, Diagnoser);
2648  }
2649 
2651  TypeDiagnoser &Diagnoser);
2652  bool RequireLiteralType(SourceLocation Loc, QualType T, unsigned DiagID);
2653 
2654  template <typename... Ts>
2655  bool RequireLiteralType(SourceLocation Loc, QualType T, unsigned DiagID,
2656  const Ts &...Args) {
2657  BoundTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
2658  return RequireLiteralType(Loc, T, Diagnoser);
2659  }
2660 
2662  const CXXScopeSpec &SS, QualType T,
2663  TagDecl *OwnedTagDecl = nullptr);
2664 
2665  // Returns the underlying type of a decltype with the given expression.
2667 
2669  /// If AsUnevaluated is false, E is treated as though it were an evaluated
2670  /// context, such as when building a type for decltype(auto).
2671  QualType BuildDecltypeType(Expr *E, bool AsUnevaluated = true);
2674  SourceLocation Loc);
2675 
2676  //===--------------------------------------------------------------------===//
2677  // Symbol table / Decl tracking callbacks: SemaDecl.cpp.
2678  //
2679 
2680  struct SkipBodyInfo {
2683  New(nullptr) {}
2688  };
2689 
2690  DeclGroupPtrTy ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType = nullptr);
2691 
2693 
2695 
2697  Scope *S, CXXScopeSpec *SS = nullptr,
2698  bool isClassName = false, bool HasTrailingDot = false,
2699  ParsedType ObjectType = nullptr,
2700  bool IsCtorOrDtorName = false,
2701  bool WantNontrivialTypeSourceInfo = false,
2702  bool IsClassTemplateDeductionContext = true,
2703  IdentifierInfo **CorrectedII = nullptr);
2705  bool isMicrosoftMissingTypename(const CXXScopeSpec *SS, Scope *S);
2707  SourceLocation IILoc,
2708  Scope *S,
2709  CXXScopeSpec *SS,
2710  ParsedType &SuggestedType,
2711  bool IsTemplateName = false);
2712 
2713  /// Attempt to behave like MSVC in situations where lookup of an unqualified
2714  /// type name has failed in a dependent context. In these situations, we
2715  /// automatically form a DependentTypeName that will retry lookup in a related
2716  /// scope during instantiation.
2718  SourceLocation NameLoc,
2719  bool IsTemplateTypeArg);
2720 
2721  /// Describes the result of the name lookup and resolution performed
2722  /// by \c ClassifyName().
2724  /// This name is not a type or template in this context, but might be
2725  /// something else.
2727  /// Classification failed; an error has been produced.
2729  /// The name has been typo-corrected to a keyword.
2731  /// The name was classified as a type.
2733  /// The name was classified as a specific non-type, non-template
2734  /// declaration. ActOnNameClassifiedAsNonType should be called to
2735  /// convert the declaration to an expression.
2737  /// The name was classified as an ADL-only function name.
2738  /// ActOnNameClassifiedAsUndeclaredNonType should be called to convert the
2739  /// result to an expression.
2741  /// The name denotes a member of a dependent type that could not be
2742  /// resolved. ActOnNameClassifiedAsDependentNonType should be called to
2743  /// convert the result to an expression.
2745  /// The name was classified as an overload set, and an expression
2746  /// representing that overload set has been formed.
2747  /// ActOnNameClassifiedAsOverloadSet should be called to form a suitable
2748  /// expression referencing the overload set.
2750  /// The name was classified as a template whose specializations are types.
2752  /// The name was classified as a variable template name.
2754  /// The name was classified as a function template name.
2756  /// The name was classified as an ADL-only function template name.
2758  /// The name was classified as a concept name.
2760  };
2761 
2764  union {
2769  };
2770 
2771  explicit NameClassification(NameClassificationKind Kind) : Kind(Kind) {}
2772 
2773  public:
2775 
2776  NameClassification(const IdentifierInfo *Keyword) : Kind(NC_Keyword) {}
2777 
2779  return NameClassification(NC_Error);
2780  }
2781 
2784  }
2785 
2788  Result.Expr = E;
2789  return Result;
2790  }
2791 
2794  Result.NonTypeDecl = D;
2795  return Result;
2796  }
2797 
2800  }
2801 
2804  }
2805 
2808  Result.Template = Name;
2809  return Result;
2810  }
2811 
2814  Result.Template = Name;
2815  return Result;
2816  }
2817 
2820  Result.Template = Name;
2821  return Result;
2822  }
2823 
2826  Result.Template = Name;
2827  return Result;
2828  }
2829 
2832  Result.Template = Name;
2833  return Result;
2834  }
2835 
2836  NameClassificationKind getKind() const { return Kind; }
2837 
2839  assert(Kind == NC_OverloadSet);
2840  return Expr;
2841  }
2842 
2844  assert(Kind == NC_Type);
2845  return Type;
2846  }
2847 
2849  assert(Kind == NC_NonType);
2850  return NonTypeDecl;
2851  }
2852 
2854  assert(Kind == NC_TypeTemplate || Kind == NC_FunctionTemplate ||
2855  Kind == NC_VarTemplate || Kind == NC_Concept ||
2856  Kind == NC_UndeclaredTemplate);
2857  return Template;
2858  }
2859 
2861  switch (Kind) {
2862  case NC_TypeTemplate:
2863  return TNK_Type_template;
2864  case NC_FunctionTemplate:
2865  return TNK_Function_template;
2866  case NC_VarTemplate:
2867  return TNK_Var_template;
2868  case NC_Concept:
2869  return TNK_Concept_template;
2870  case NC_UndeclaredTemplate:
2871  return TNK_Undeclared_template;
2872  default:
2873  llvm_unreachable("unsupported name classification.");
2874  }
2875  }
2876  };
2877 
2878  /// Perform name lookup on the given name, classifying it based on
2879  /// the results of name lookup and the following token.
2880  ///
2881  /// This routine is used by the parser to resolve identifiers and help direct
2882  /// parsing. When the identifier cannot be found, this routine will attempt
2883  /// to correct the typo and classify based on the resulting name.
2884  ///
2885  /// \param S The scope in which we're performing name lookup.
2886  ///
2887  /// \param SS The nested-name-specifier that precedes the name.
2888  ///
2889  /// \param Name The identifier. If typo correction finds an alternative name,
2890  /// this pointer parameter will be updated accordingly.
2891  ///
2892  /// \param NameLoc The location of the identifier.
2893  ///
2894  /// \param NextToken The token following the identifier. Used to help
2895  /// disambiguate the name.
2896  ///
2897  /// \param CCC The correction callback, if typo correction is desired.
2898  NameClassification ClassifyName(Scope *S, CXXScopeSpec &SS,
2899  IdentifierInfo *&Name, SourceLocation NameLoc,
2900  const Token &NextToken,
2901  CorrectionCandidateCallback *CCC = nullptr);
2902 
2903  /// Act on the result of classifying a name as an undeclared (ADL-only)
2904  /// non-type declaration.
2906  SourceLocation NameLoc);
2907  /// Act on the result of classifying a name as an undeclared member of a
2908  /// dependent base class.
2910  IdentifierInfo *Name,
2911  SourceLocation NameLoc,
2912  bool IsAddressOfOperand);
2913  /// Act on the result of classifying a name as a specific non-type
2914  /// declaration.
2916  NamedDecl *Found,
2917  SourceLocation NameLoc,
2918  const Token &NextToken);
2919  /// Act on the result of classifying a name as an overload set.
2921 
2922  /// Describes the detailed kind of a template name. Used in diagnostics.
2924  ClassTemplate,
2926  VarTemplate,
2927  AliasTemplate,
2929  Concept,
2931  };
2934 
2935  /// Determine whether it's plausible that E was intended to be a
2936  /// template-name.
2937  bool mightBeIntendedToBeTemplateName(ExprResult E, bool &Dependent) {
2938  if (!getLangOpts().CPlusPlus || E.isInvalid())
2939  return false;
2940  Dependent = false;
2941  if (auto *DRE = dyn_cast<DeclRefExpr>(E.get()))
2942  return !DRE->hasExplicitTemplateArgs();
2943  if (auto *ME = dyn_cast<MemberExpr>(E.get()))
2944  return !ME->hasExplicitTemplateArgs();
2945  Dependent = true;
2946  if (auto *DSDRE = dyn_cast<DependentScopeDeclRefExpr>(E.get()))
2947  return !DSDRE->hasExplicitTemplateArgs();
2948  if (auto *DSME = dyn_cast<CXXDependentScopeMemberExpr>(E.get()))
2949  return !DSME->hasExplicitTemplateArgs();
2950  // Any additional cases recognized here should also be handled by
2951  // diagnoseExprIntendedAsTemplateName.
2952  return false;
2953  }
2955  SourceLocation Less,
2956  SourceLocation Greater);
2957 
2958  void warnOnReservedIdentifier(const NamedDecl *D);
2959 
2961 
2963  MultiTemplateParamsArg TemplateParameterLists);
2965  QualType &T, SourceLocation Loc,
2966  unsigned FailedFoldDiagID);
2970  DeclarationName Name, SourceLocation Loc,
2971  bool IsTemplateId);
2972  void
2973  diagnoseIgnoredQualifiers(unsigned DiagID, unsigned Quals,
2974  SourceLocation FallbackLoc,
2975  SourceLocation ConstQualLoc = SourceLocation(),
2976  SourceLocation VolatileQualLoc = SourceLocation(),
2977  SourceLocation RestrictQualLoc = SourceLocation(),
2978  SourceLocation AtomicQualLoc = SourceLocation(),
2979  SourceLocation UnalignedQualLoc = SourceLocation());
2980 
2981  static bool adjustContextForLocalExternDecl(DeclContext *&DC);
2982  void DiagnoseFunctionSpecifiers(const DeclSpec &DS);
2984  const LookupResult &R);
2987  const LookupResult &R);
2988  void CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl,
2989  const LookupResult &R);
2990  void CheckShadow(Scope *S, VarDecl *D);
2991 
2992  /// Warn if 'E', which is an expression that is about to be modified, refers
2993  /// to a shadowing declaration.
2995 
2997 
2998 private:
2999  /// Map of current shadowing declarations to shadowed declarations. Warn if
3000  /// it looks like the user is trying to modify the shadowing declaration.
3001  llvm::DenseMap<const NamedDecl *, const NamedDecl *> ShadowingDecls;
3002 
3003 public:
3004  void CheckCastAlign(Expr *Op, QualType T, SourceRange TRange);
3005  void handleTagNumbering(const TagDecl *Tag, Scope *TagScope);
3006  void setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec,
3007  TypedefNameDecl *NewTD);
3010  TypeSourceInfo *TInfo,
3013  LookupResult &Previous, bool &Redeclaration);
3015  TypeSourceInfo *TInfo,
3017  MultiTemplateParamsArg TemplateParamLists,
3018  bool &AddToScope,
3020  NamedDecl *
3022  MultiTemplateParamsArg TemplateParamLists);
3023  // Returns true if the variable declaration is a redeclaration
3026  bool DeduceVariableDeclarationType(VarDecl *VDecl, bool DirectInit,
3027  Expr *Init);
3031 
3033  TypeSourceInfo *TInfo,
3035  MultiTemplateParamsArg TemplateParamLists,
3036  bool &AddToScope);
3038 
3039  enum class CheckConstexprKind {
3040  /// Diagnose issues that are non-constant or that are extensions.
3041  Diagnose,
3042  /// Identify whether this function satisfies the formal rules for constexpr
3043  /// functions in the current lanugage mode (with no extensions).
3044  CheckValid
3045  };
3046 
3049 
3052  SmallVectorImpl<CXXMethodDecl*> &OverloadedMethods);
3054  SmallVectorImpl<CXXMethodDecl*> &OverloadedMethods);
3055  // Returns true if the function declaration is a redeclaration
3058  bool IsMemberSpecialization);
3059  bool shouldLinkDependentDeclWithPrevious(Decl *D, Decl *OldDecl);
3061  QualType NewT, QualType OldT);
3062  void CheckMain(FunctionDecl *FD, const DeclSpec &D);
3065  bool IsDefinition);
3069  SourceLocation Loc,
3070  QualType T);
3072  SourceLocation NameLoc, IdentifierInfo *Name,
3073  QualType T, TypeSourceInfo *TSInfo,
3074  StorageClass SC);
3075  void ActOnParamDefaultArgument(Decl *param,
3076  SourceLocation EqualLoc,
3077  Expr *defarg);
3079  SourceLocation ArgLoc);
3080  void ActOnParamDefaultArgumentError(Decl *param, SourceLocation EqualLoc);
3082  SourceLocation EqualLoc);
3083  void SetParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg,
3084  SourceLocation EqualLoc);
3085 
3086  // Contexts where using non-trivial C union types can be disallowed. This is
3087  // passed to err_non_trivial_c_union_in_invalid_context.
3089  // Function parameter.
3091  // Function return.
3093  // Default-initialized object.
3095  // Variable with automatic storage duration.
3097  // Initializer expression that might copy from another object.
3099  // Assignment.
3101  // Compound literal.
3103  // Block capture.
3105  // lvalue-to-rvalue conversion of volatile type.
3107  };
3108 
3109  /// Emit diagnostics if the initializer or any of its explicit or
3110  /// implicitly-generated subexpressions require copying or
3111  /// default-initializing a type that is or contains a C union type that is
3112  /// non-trivial to copy or default-initialize.
3114 
3115  // These flags are passed to checkNonTrivialCUnion.
3117  NTCUK_Init = 0x1,
3119  NTCUK_Copy = 0x4,
3120  };
3121 
3122  /// Emit diagnostics if a non-trivial C union type or a struct that contains
3123  /// a non-trivial C union is used in an invalid context.
3125  NonTrivialCUnionContext UseContext,
3126  unsigned NonTrivialKind);
3127 
3128  void AddInitializerToDecl(Decl *dcl, Expr *init, bool DirectInit);
3129  void ActOnUninitializedDecl(Decl *dcl);
3130  void ActOnInitializerError(Decl *Dcl);
3131 
3132  void ActOnPureSpecifier(Decl *D, SourceLocation PureSpecLoc);
3133  void ActOnCXXForRangeDecl(Decl *D);
3135  IdentifierInfo *Ident,
3136  ParsedAttributes &Attrs);
3137  void SetDeclDeleted(Decl *dcl, SourceLocation DelLoc);
3138  void SetDeclDefaulted(Decl *dcl, SourceLocation DefaultLoc);
3140  void FinalizeDeclaration(Decl *D);
3144 
3145  /// Should be called on all declarations that might have attached
3146  /// documentation comments.
3147  void ActOnDocumentableDecl(Decl *D);
3149 
3151  SourceLocation LocAfterDecls);
3153  FunctionDecl *FD, const FunctionDecl *EffectiveDefinition = nullptr,
3154  SkipBodyInfo *SkipBody = nullptr);
3156  MultiTemplateParamsArg TemplateParamLists,
3157  SkipBodyInfo *SkipBody = nullptr);
3159  SkipBodyInfo *SkipBody = nullptr);
3162  ExprResult ActOnRequiresClause(ExprResult ConstraintExpr);
3163  void ActOnStartOfObjCMethodDef(Scope *S, Decl *D);
3165  return D && isa<ObjCMethodDecl>(D);
3166  }
3167 
3168  /// Determine whether we can delay parsing the body of a function or
3169  /// function template until it is used, assuming we don't care about emitting
3170  /// code for that function.
3171  ///
3172  /// This will be \c false if we may need the body of the function in the
3173  /// middle of parsing an expression (where it's impractical to switch to
3174  /// parsing a different function), for instance, if it's constexpr in C++11
3175  /// or has an 'auto' return type in C++14. These cases are essentially bugs.
3176  bool canDelayFunctionBody(const Declarator &D);
3177 
3178  /// Determine whether we can skip parsing the body of a function
3179  /// definition, assuming we don't care about analyzing its body or emitting
3180  /// code for that function.
3181  ///
3182  /// This will be \c false only if we may need the body of the function in
3183  /// order to parse the rest of the program (for instance, if it is
3184  /// \c constexpr in C++11 or has an 'auto' return type in C++14).
3185  bool canSkipFunctionBody(Decl *D);
3186 
3189  Decl *ActOnFinishFunctionBody(Decl *Decl, Stmt *Body, bool IsInstantiation);
3192 
3193  /// ActOnFinishDelayedAttribute - Invoked when we have finished parsing an
3194  /// attribute for which parsing is delayed.
3196 
3197  /// Diagnose any unused parameters in the given sequence of
3198  /// ParmVarDecl pointers.
3200 
3201  /// Diagnose whether the size of parameters or return value of a
3202  /// function or obj-c method definition is pass-by-value and larger than a
3203  /// specified threshold.
3204  void
3206  QualType ReturnTy, NamedDecl *D);
3207 
3208  void DiagnoseInvalidJumps(Stmt *Body);
3210  SourceLocation AsmLoc,
3211  SourceLocation RParenLoc);
3212 
3213  /// Handle a C++11 empty-declaration and attribute-declaration.
3215  SourceLocation SemiLoc);
3216 
3217  enum class ModuleDeclKind {
3218  Interface, ///< 'export module X;'
3219  Implementation, ///< 'module X;'
3220  PartitionInterface, ///< 'export module X:Y;'
3221  PartitionImplementation, ///< 'module X:Y;'
3222  };
3223 
3224  /// An enumeration to represent the transition of states in parsing module
3225  /// fragments and imports. If we are not parsing a C++20 TU, or we find
3226  /// an error in state transition, the state is set to NotACXX20Module.
3227  enum class ModuleImportState {
3228  FirstDecl, ///< Parsing the first decl in a TU.
3229  GlobalFragment, ///< after 'module;' but before 'module X;'
3230  ImportAllowed, ///< after 'module X;' but before any non-import decl.
3231  ImportFinished, ///< after any non-import decl.
3232  PrivateFragment, ///< after 'module :private;'.
3233  NotACXX20Module ///< Not a C++20 TU, or an invalid state was found.
3234  };
3235 
3236 private:
3237  /// The parser has begun a translation unit to be compiled as a C++20
3238  /// Header Unit, helper for ActOnStartOfTranslationUnit() only.
3239  void HandleStartOfHeaderUnit();
3240 
3241 public:
3242  /// The parser has processed a module-declaration that begins the definition
3243  /// of a module interface or implementation.
3245  SourceLocation ModuleLoc, ModuleDeclKind MDK,
3246  ModuleIdPath Path, ModuleIdPath Partition,
3247  ModuleImportState &ImportState);
3248 
3249  /// The parser has processed a global-module-fragment declaration that begins
3250  /// the definition of the global module fragment of the current module unit.
3251  /// \param ModuleLoc The location of the 'module' keyword.
3253 
3254  /// The parser has processed a private-module-fragment declaration that begins
3255  /// the definition of the private module fragment of the current module unit.
3256  /// \param ModuleLoc The location of the 'module' keyword.
3257  /// \param PrivateLoc The location of the 'private' keyword.
3259  SourceLocation PrivateLoc);
3260 
3261  /// The parser has processed a module import declaration.
3262  ///
3263  /// \param StartLoc The location of the first token in the declaration. This
3264  /// could be the location of an '@', 'export', or 'import'.
3265  /// \param ExportLoc The location of the 'export' keyword, if any.
3266  /// \param ImportLoc The location of the 'import' keyword.
3267  /// \param Path The module toplevel name as an access path.
3268  /// \param IsPartition If the name is for a partition.
3270  SourceLocation ExportLoc,
3271  SourceLocation ImportLoc, ModuleIdPath Path,
3272  bool IsPartition = false);
3274  SourceLocation ExportLoc,
3275  SourceLocation ImportLoc, Module *M,
3276  ModuleIdPath Path = {});
3277 
3278  /// The parser has processed a module import translated from a
3279  /// #include or similar preprocessing directive.
3280  void ActOnModuleInclude(SourceLocation DirectiveLoc, Module *Mod);
3281  void BuildModuleInclude(SourceLocation DirectiveLoc, Module *Mod);
3282 
3283  /// The parsed has entered a submodule.
3284  void ActOnModuleBegin(SourceLocation DirectiveLoc, Module *Mod);
3285  /// The parser has left a submodule.
3286  void ActOnModuleEnd(SourceLocation DirectiveLoc, Module *Mod);
3287 
3288  /// Create an implicit import of the given module at the given
3289  /// source location, for error recovery, if possible.
3290  ///
3291  /// This routine is typically used when an entity found by name lookup
3292  /// is actually hidden within a module that we know about but the user
3293  /// has forgotten to import.
3294  void createImplicitModuleImportForErrorRecovery(SourceLocation Loc,
3295  Module *Mod);
3296 
3297  /// Kinds of missing import. Note, the values of these enumerators correspond
3298  /// to %select values in diagnostics.
3299  enum class MissingImportKind {
3300  Declaration,
3301  Definition,
3305  };
3306 
3307  /// Diagnose that the specified declaration needs to be visible but
3308  /// isn't, and suggest a module import that would resolve the problem.
3310  MissingImportKind MIK, bool Recover = true);
3312  SourceLocation DeclLoc, ArrayRef<Module *> Modules,
3313  MissingImportKind MIK, bool Recover);
3314 
3316  SourceLocation LBraceLoc);
3318  SourceLocation RBraceLoc);
3319 
3320  /// We've found a use of a templated declaration that would trigger an
3321  /// implicit instantiation. Check that any relevant explicit specializations
3322  /// and partial specializations are visible, and diagnose if not.
3324 
3325  /// Retrieve a suitable printing policy for diagnostics.
3327  return getPrintingPolicy(Context, PP);
3328  }
3329 
3330  /// Retrieve a suitable printing policy for diagnostics.
3331  static PrintingPolicy getPrintingPolicy(const ASTContext &Ctx,
3332  const Preprocessor &PP);
3333 
3334  /// Scope actions.
3335  void ActOnPopScope(SourceLocation Loc, Scope *S);
3337 
3339  RecordDecl *&AnonRecord);
3341  MultiTemplateParamsArg TemplateParams,
3342  bool IsExplicitInstantiation,
3343  RecordDecl *&AnonRecord);
3344 
3346  AccessSpecifier AS,
3347  RecordDecl *Record,
3348  const PrintingPolicy &Policy);
3349 
3351  RecordDecl *Record);
3352 
3353  /// Common ways to introduce type names without a tag for use in diagnostics.
3354  /// Keep in sync with err_tag_reference_non_tag.
3355  enum NonTagKind {
3365  };
3366 
3367  /// Given a non-tag type declaration, returns an enum useful for indicating
3368  /// what kind of non-tag type this is.
3370 
3372  TagTypeKind NewTag, bool isDefinition,
3373  SourceLocation NewTagLoc,
3374  const IdentifierInfo *Name);
3375 
3376  enum TagUseKind {
3377  TUK_Reference, // Reference to a tag: 'struct foo *X;'
3378  TUK_Declaration, // Fwd decl of a tag: 'struct foo;'
3379  TUK_Definition, // Definition of a tag: 'struct foo { int X; } Y;'
3380  TUK_Friend // Friend declaration: 'friend struct foo;'
3381  };
3382 
3383  Decl *ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK,
3384  SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name,
3385  SourceLocation NameLoc, const ParsedAttributesView &Attr,
3386  AccessSpecifier AS, SourceLocation ModulePrivateLoc,
3387  MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl,
3388  bool &IsDependent, SourceLocation ScopedEnumKWLoc,
3389  bool ScopedEnumUsesClassTag, TypeResult UnderlyingType,
3390  bool IsTypeSpecifier, bool IsTemplateParamOrArg,
3391  SkipBodyInfo *SkipBody = nullptr);
3392 
3394  unsigned TagSpec, SourceLocation TagLoc,
3395  CXXScopeSpec &SS, IdentifierInfo *Name,
3396  SourceLocation NameLoc,
3397  const ParsedAttributesView &Attr,
3398  MultiTemplateParamsArg TempParamLists);
3399 
3401  unsigned TagSpec,
3402  TagUseKind TUK,
3403  const CXXScopeSpec &SS,
3404  IdentifierInfo *Name,
3405  SourceLocation TagLoc,
3406  SourceLocation NameLoc);
3407 
3408  void ActOnDefs(Scope *S, Decl *TagD, SourceLocation DeclStart,
3409  IdentifierInfo *ClassName,
3410  SmallVectorImpl<Decl *> &Decls);
3411  Decl *ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart,
3412  Declarator &D, Expr *BitfieldWidth);
3413 
3414  FieldDecl *HandleField(Scope *S, RecordDecl *TagD, SourceLocation DeclStart,
3415  Declarator &D, Expr *BitfieldWidth,
3416  InClassInitStyle InitStyle,
3417  AccessSpecifier AS);
3419  SourceLocation DeclStart, Declarator &D,
3420  Expr *BitfieldWidth,
3421  InClassInitStyle InitStyle,
3422  AccessSpecifier AS,
3423  const ParsedAttr &MSPropertyAttr);
3424 
3426  TypeSourceInfo *TInfo,
3427  RecordDecl *Record, SourceLocation Loc,
3428  bool Mutable, Expr *BitfieldWidth,
3429  InClassInitStyle InitStyle,
3430  SourceLocation TSSL,
3431  AccessSpecifier AS, NamedDecl *PrevDecl,
3432  Declarator *D = nullptr);
3433 
3434  bool CheckNontrivialField(FieldDecl *FD);
3435  void DiagnoseNontrivial(const CXXRecordDecl *Record, CXXSpecialMember CSM);
3436 
3438  /// The triviality of a method unaffected by "trivial_abi".
3440 
3441  /// The triviality of a method affected by "trivial_abi".
3443  };
3444 
3447  bool Diagnose = false);
3448 
3449  /// For a defaulted function, the kind of defaulted function that it is.
3451  CXXSpecialMember SpecialMember : 8;
3452  DefaultedComparisonKind Comparison : 8;
3453 
3454  public:
3456  : SpecialMember(CXXInvalid), Comparison(DefaultedComparisonKind::None) {
3457  }
3459  : SpecialMember(CSM), Comparison(DefaultedComparisonKind::None) {}
3461  : SpecialMember(CXXInvalid), Comparison(Comp) {}
3462 
3463  bool isSpecialMember() const { return SpecialMember != CXXInvalid; }
3464  bool isComparison() const {
3465  return Comparison != DefaultedComparisonKind::None;
3466  }
3467 
3468  explicit operator bool() const {
3469  return isSpecialMember() || isComparison();
3470  }
3471 
3472  CXXSpecialMember asSpecialMember() const { return SpecialMember; }
3473  DefaultedComparisonKind asComparison() const { return Comparison; }
3474 
3475  /// Get the index of this function kind for use in diagnostics.
3476  unsigned getDiagnosticIndex() const {
3477  static_assert(CXXInvalid > CXXDestructor,
3478  "invalid should have highest index");
3479  static_assert((unsigned)DefaultedComparisonKind::None == 0,
3480  "none should be equal to zero");
3481  return SpecialMember + (unsigned)Comparison;
3482  }
3483  };
3484 
3485  DefaultedFunctionKind getDefaultedFunctionKind(const FunctionDecl *FD);
3486 
3489  }
3492  }
3493 
3494  void ActOnLastBitfield(SourceLocation DeclStart,
3495  SmallVectorImpl<Decl *> &AllIvarDecls);
3496  Decl *ActOnIvar(Scope *S, SourceLocation DeclStart,
3497  Declarator &D, Expr *BitfieldWidth,
3498  tok::ObjCKeywordKind visibility);
3499 
3500  // This is used for both record definitions and ObjC interface declarations.
3501  void ActOnFields(Scope *S, SourceLocation RecLoc, Decl *TagDecl,
3502  ArrayRef<Decl *> Fields, SourceLocation LBrac,
3503  SourceLocation RBrac, const ParsedAttributesView &AttrList);
3504 
3505  /// ActOnTagStartDefinition - Invoked when we have entered the
3506  /// scope of a tag's definition (e.g., for an enumeration, class,
3507  /// struct, or union).
3509 
3510  /// Perform ODR-like check for C/ObjC when merging tag types from modules.
3511  /// Differently from C++, actually parse the body and reject / error out
3512  /// in case of a structural mismatch.
3513  bool ActOnDuplicateDefinition(DeclSpec &DS, Decl *Prev,
3514  SkipBodyInfo &SkipBody);
3515 
3517 
3518  /// Invoked when we enter a tag definition that we're skipping.
3520 
3522 
3523  /// ActOnStartCXXMemberDeclarations - Invoked when we have parsed a
3524  /// C++ record definition's base-specifiers clause and are starting its
3525  /// member declarations.
3527  SourceLocation FinalLoc,
3528  bool IsFinalSpelledSealed,
3529  bool IsAbstract,
3530  SourceLocation LBraceLoc);
3531 
3532  /// ActOnTagFinishDefinition - Invoked once we have finished parsing
3533  /// the definition of a tag (enumeration, class, struct, or union).
3535  SourceRange BraceRange);
3536 
3538 
3540 
3541  /// Invoked when we must temporarily exit the objective-c container
3542  /// scope for parsing/looking-up C constructs.
3543  ///
3544  /// Must be followed by a call to \see ActOnObjCReenterContainerContext
3547 
3548  /// ActOnTagDefinitionError - Invoked when there was an unrecoverable
3549  /// error parsing the definition of a tag.
3551 
3553  EnumConstantDecl *LastEnumConst,
3554  SourceLocation IdLoc,
3555  IdentifierInfo *Id,
3556  Expr *val);
3558  bool CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped,
3559  QualType EnumUnderlyingTy, bool IsFixed,
3560  const EnumDecl *Prev);
3561 
3562  /// Determine whether the body of an anonymous enumeration should be skipped.
3563  /// \param II The name of the first enumerator.
3565  SourceLocation IILoc);
3566 
3567  Decl *ActOnEnumConstant(Scope *S, Decl *EnumDecl, Decl *LastEnumConstant,
3569  const ParsedAttributesView &Attrs,
3570  SourceLocation EqualLoc, Expr *Val);
3571  void ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange,
3572  Decl *EnumDecl, ArrayRef<Decl *> Elements, Scope *S,
3573  const ParsedAttributesView &Attr);
3574 
3575  /// Set the current declaration context until it gets popped.
3576  void PushDeclContext(Scope *S, DeclContext *DC);
3577  void PopDeclContext();
3578 
3579  /// EnterDeclaratorContext - Used when we must lookup names in the context
3580  /// of a declarator's nested name specifier.
3582  void ExitDeclaratorContext(Scope *S);
3583 
3584  /// Enter a template parameter scope, after it's been associated with a particular
3585  /// DeclContext. Causes lookup within the scope to chain through enclosing contexts
3586  /// in the correct order.
3587  void EnterTemplatedContext(Scope *S, DeclContext *DC);
3588 
3589  /// Push the parameters of D, which must be a function, into scope.
3590  void ActOnReenterFunctionContext(Scope* S, Decl* D);
3591  void ActOnExitFunctionContext();
3592 
3593  /// If \p AllowLambda is true, treat lambda as function.
3594  DeclContext *getFunctionLevelDeclContext(bool AllowLambda = false);
3595 
3596  /// Returns a pointer to the innermost enclosing function, or nullptr if the
3597  /// current context is not inside a function. If \p AllowLambda is true,
3598  /// this can return the call operator of an enclosing lambda, otherwise
3599  /// lambdas are skipped when looking for an enclosing function.
3600  FunctionDecl *getCurFunctionDecl(bool AllowLambda = false);
3601 
3602  /// getCurMethodDecl - If inside of a method body, this returns a pointer to
3603  /// the method decl for the method being parsed. If we're currently
3604  /// in a 'block', this returns the containing context.
3606 
3607  /// getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method
3608  /// or C function we're in, otherwise return null. If we're currently
3609  /// in a 'block', this returns the containing context.
3611 
3612  /// Add this decl to the scope shadowed decl chains.
3613  void PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext = true);
3614 
3615  /// isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true
3616  /// if 'D' is in Scope 'S', otherwise 'S' is ignored and isDeclInScope returns
3617  /// true if 'D' belongs to the given declaration context.
3618  ///
3619  /// \param AllowInlineNamespace If \c true, allow the declaration to be in the
3620  /// enclosing namespace set of the context, rather than contained
3621  /// directly within it.
3622  bool isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S = nullptr,
3623  bool AllowInlineNamespace = false);
3624 
3625  /// Finds the scope corresponding to the given decl context, if it
3626  /// happens to be an enclosing scope. Otherwise return NULL.
3627  static Scope *getScopeForDeclContext(Scope *S, DeclContext *DC);
3628 
3629  /// Subroutines of ActOnDeclarator().
3631  TypeSourceInfo *TInfo);
3633 
3634  /// Describes the kind of merge to perform for availability
3635  /// attributes (including "deprecated", "unavailable", and "availability").
3637  /// Don't merge availability attributes at all.
3639  /// Merge availability attributes for a redeclaration, which requires
3640  /// an exact match.
3642  /// Merge availability attributes for an override, which requires
3643  /// an exact match or a weakening of constraints.
3645  /// Merge availability attributes for an implementation of
3646  /// a protocol requirement.
3648  /// Merge availability attributes for an implementation of
3649  /// an optional protocol requirement.
3651  };
3652 
3653  /// Describes the kind of priority given to an availability attribute.
3654  ///
3655  /// The sum of priorities deteremines the final priority of the attribute.
3656  /// The final priority determines how the attribute will be merged.
3657  /// An attribute with a lower priority will always remove higher priority
3658  /// attributes for the specified platform when it is being applied. An
3659  /// attribute with a higher priority will not be applied if the declaration
3660  /// already has an availability attribute with a lower priority for the
3661  /// specified platform. The final prirority values are not expected to match
3662  /// the values in this enumeration, but instead should be treated as a plain
3663  /// integer value. This enumeration just names the priority weights that are
3664  /// used to calculate that final vaue.
3666  /// The availability attribute was specified explicitly next to the
3667  /// declaration.
3669 
3670  /// The availability attribute was applied using '#pragma clang attribute'.
3672 
3673  /// The availability attribute for a specific platform was inferred from
3674  /// an availability attribute for another platform.
3676  };
3677 
3678  /// Attribute merging methods. Return true if a new attribute was added.
3679  AvailabilityAttr *
3681  IdentifierInfo *Platform, bool Implicit,
3682  VersionTuple Introduced, VersionTuple Deprecated,
3683  VersionTuple Obsoleted, bool IsUnavailable,
3684  StringRef Message, bool IsStrict, StringRef Replacement,
3685  AvailabilityMergeKind AMK, int Priority);
3686  TypeVisibilityAttr *
3688  TypeVisibilityAttr::VisibilityType Vis);
3689  VisibilityAttr *mergeVisibilityAttr(Decl *D, const AttributeCommonInfo &CI,
3690  VisibilityAttr::VisibilityType Vis);
3691  UuidAttr *mergeUuidAttr(Decl *D, const AttributeCommonInfo &CI,
3692  StringRef UuidAsWritten, MSGuidDecl *GuidDecl);
3693  DLLImportAttr *mergeDLLImportAttr(Decl *D, const AttributeCommonInfo &CI);
3694  DLLExportAttr *mergeDLLExportAttr(Decl *D, const AttributeCommonInfo &CI);
3695  MSInheritanceAttr *mergeMSInheritanceAttr(Decl *D,
3696  const AttributeCommonInfo &CI,
3697  bool BestCase,
3698  MSInheritanceModel Model);
3699  ErrorAttr *mergeErrorAttr(Decl *D, const AttributeCommonInfo &CI,
3700  StringRef NewUserDiagnostic);
3701  FormatAttr *mergeFormatAttr(Decl *D, const AttributeCommonInfo &CI,
3702  IdentifierInfo *Format, int FormatIdx,
3703  int FirstArg);
3704  SectionAttr *mergeSectionAttr(Decl *D, const AttributeCommonInfo &CI,
3705  StringRef Name);
3706  CodeSegAttr *mergeCodeSegAttr(Decl *D, const AttributeCommonInfo &CI,
3707  StringRef Name);
3708  AlwaysInlineAttr *mergeAlwaysInlineAttr(Decl *D,
3709  const AttributeCommonInfo &CI,
3710  const IdentifierInfo *Ident);
3711  MinSizeAttr *mergeMinSizeAttr(Decl *D, const AttributeCommonInfo &CI);
3712  SwiftNameAttr *mergeSwiftNameAttr(Decl *D, const SwiftNameAttr &SNA,
3713  StringRef Name);
3714  OptimizeNoneAttr *mergeOptimizeNoneAttr(Decl *D,
3715  const AttributeCommonInfo &CI);
3716  InternalLinkageAttr *mergeInternalLinkageAttr(Decl *D, const ParsedAttr &AL);
3717  InternalLinkageAttr *mergeInternalLinkageAttr(Decl *D,
3718  const InternalLinkageAttr &AL);
3719  WebAssemblyImportNameAttr *mergeImportNameAttr(
3720  Decl *D, const WebAssemblyImportNameAttr &AL);
3721  WebAssemblyImportModuleAttr *mergeImportModuleAttr(
3722  Decl *D, const WebAssemblyImportModuleAttr &AL);
3723  EnforceTCBAttr *mergeEnforceTCBAttr(Decl *D, const EnforceTCBAttr &AL);
3724  EnforceTCBLeafAttr *mergeEnforceTCBLeafAttr(Decl *D,
3725  const EnforceTCBLeafAttr &AL);
3726  BTFDeclTagAttr *mergeBTFDeclTagAttr(Decl *D, const BTFDeclTagAttr &AL);
3727 
3728  void mergeDeclAttributes(NamedDecl *New, Decl *Old,
3731  LookupResult &OldDecls);
3732  bool MergeFunctionDecl(FunctionDecl *New, NamedDecl *&Old, Scope *S,
3733  bool MergeTypeWithOld);
3735  Scope *S, bool MergeTypeWithOld);
3738  void MergeVarDeclTypes(VarDecl *New, VarDecl *Old, bool MergeTypeWithOld);
3739  void MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old);
3740  bool checkVarDeclRedefinition(VarDecl *OldDefn, VarDecl *NewDefn);
3741  void notePreviousDefinition(const NamedDecl *Old, SourceLocation New);
3742  bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S);
3743 
3744  // AssignmentAction - This is used by all the assignment diagnostic functions
3745  // to represent what is actually causing the operation
3755  };
3756 
3757  /// C++ Overloading.
3759  /// This is a legitimate overload: the existing declarations are
3760  /// functions or function templates with different signatures.
3762 
3763  /// This is not an overload because the signature exactly matches
3764  /// an existing declaration.
3766 
3767  /// This is not an overload because the lookup results contain a
3768  /// non-function.
3770  };
3772  FunctionDecl *New,
3773  const LookupResult &OldDecls,
3774  NamedDecl *&OldDecl,
3775  bool IsForUsingDecl);
3776  bool IsOverload(FunctionDecl *New, FunctionDecl *Old, bool IsForUsingDecl,
3777  bool ConsiderCudaAttrs = true,
3778  bool ConsiderRequiresClauses = true);
3779 
3780  enum class AllowedExplicit {
3781  /// Allow no explicit functions to be used.
3782  None,
3783  /// Allow explicit conversion functions but not explicit constructors.
3784  Conversions,
3785  /// Allow both explicit conversion functions and explicit constructors.
3786  All
3787  };
3788 
3790  TryImplicitConversion(Expr *From, QualType ToType,
3791  bool SuppressUserConversions,
3792  AllowedExplicit AllowExplicit,
3793  bool InOverloadResolution,
3794  bool CStyle,
3795  bool AllowObjCWritebackConversion);
3796 
3797  bool IsIntegralPromotion(Expr *From, QualType FromType, QualType ToType);
3798  bool IsFloatingPointPromotion(QualType FromType, QualType ToType);
3799  bool IsComplexPromotion(QualType FromType, QualType ToType);
3800  bool IsPointerConversion(Expr *From, QualType FromType, QualType ToType,
3801  bool InOverloadResolution,
3802  QualType& ConvertedType, bool &IncompatibleObjC);
3803  bool isObjCPointerConversion(QualType FromType, QualType ToType,
3804  QualType& ConvertedType, bool &IncompatibleObjC);
3805  bool isObjCWritebackConversion(QualType FromType, QualType ToType,
3806  QualType &ConvertedType);
3807  bool IsBlockPointerConversion(QualType FromType, QualType ToType,
3808  QualType& ConvertedType);
3809  bool FunctionParamTypesAreEqual(const FunctionProtoType *OldType,
3810  const FunctionProtoType *NewType,
3811  unsigned *ArgPos = nullptr);
3813  QualType FromType, QualType ToType);
3814 
3817  bool CheckPointerConversion(Expr *From, QualType ToType,
3818  CastKind &Kind,
3819  CXXCastPath& BasePath,
3820  bool IgnoreBaseAccess,
3821  bool Diagnose = true);
3822  bool IsMemberPointerConversion(Expr *From, QualType FromType, QualType ToType,
3823  bool InOverloadResolution,
3824  QualType &ConvertedType);
3825  bool CheckMemberPointerConversion(Expr *From, QualType ToType,
3826  CastKind &Kind,
3827  CXXCastPath &BasePath,
3828  bool IgnoreBaseAccess);
3829  bool IsQualificationConversion(QualType FromType, QualType ToType,
3830  bool CStyle, bool &ObjCLifetimeConversion);
3831  bool IsFunctionConversion(QualType FromType, QualType ToType,
3832  QualType &ResultTy);
3835 
3837  const InitializedEntity &Entity, InitListExpr *From);
3838 
3839  bool IsStringInit(Expr *Init, const ArrayType *AT);
3840 
3842  ExprResult Init);
3844  SourceLocation EqualLoc,
3845  ExprResult Init,
3846  bool TopLevelOfInitList = false,
3847  bool AllowExplicit = false);
3849  NestedNameSpecifier *Qualifier,
3850  NamedDecl *FoundDecl,
3851  CXXMethodDecl *Method);
3852 
3853  /// Check that the lifetime of the initializer (and its subobjects) is
3854  /// sufficient for initializing the entity, and perform lifetime extension
3855  /// (when permitted) if not.
3856  void checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init);
3857 
3860 
3861  /// Contexts in which a converted constant expression is required.
3862  enum CCEKind {
3863  CCEK_CaseValue, ///< Expression in a case label.
3864  CCEK_Enumerator, ///< Enumerator value with fixed underlying type.
3865  CCEK_TemplateArg, ///< Value of a non-type template parameter.
3866  CCEK_ArrayBound, ///< Array bound in array declarator or new-expression.
3867  CCEK_ExplicitBool, ///< Condition in an explicit(bool) specifier.
3868  CCEK_Noexcept ///< Condition in a noexcept(bool) specifier.
3869  };
3871  llvm::APSInt &Value, CCEKind CCE);
3873  APValue &Value, CCEKind CCE,
3874  NamedDecl *Dest = nullptr);
3875 
3876  /// Abstract base class used to perform a contextual implicit
3877  /// conversion from an expression to any type passing a filter.
3879  public:
3880  bool Suppress;
3882 
3884  bool SuppressConversion = false)
3886 
3887  /// Determine whether the specified type is a valid destination type
3888  /// for this conversion.
3889  virtual bool match(QualType T) = 0;
3890 
3891  /// Emits a diagnostic complaining that the expression does not have
3892  /// integral or enumeration type.
3893  virtual SemaDiagnosticBuilder
3894  diagnoseNoMatch(Sema &S, SourceLocation Loc, QualType T) = 0;
3895 
3896  /// Emits a diagnostic when the expression has incomplete class type.
3897  virtual SemaDiagnosticBuilder
3899 
3900  /// Emits a diagnostic when the only matching conversion function
3901  /// is explicit.
3903  Sema &S, SourceLocation Loc, QualType T, QualType ConvTy) = 0;
3904 
3905  /// Emits a note for the explicit conversion function.
3906  virtual SemaDiagnosticBuilder
3907  noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) = 0;
3908 
3909  /// Emits a diagnostic when there are multiple possible conversion
3910  /// functions.
3911  virtual SemaDiagnosticBuilder
3913 
3914  /// Emits a note for one of the candidate conversions.
3915  virtual SemaDiagnosticBuilder
3916  noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy) = 0;
3917 
3918  /// Emits a diagnostic when we picked a conversion function
3919  /// (for cases when we are not allowed to pick a conversion function).
3921  Sema &S, SourceLocation Loc, QualType T, QualType ConvTy) = 0;
3922 
3924  };
3925 
3927  bool AllowScopedEnumerations;
3928 
3929  public:
3930  ICEConvertDiagnoser(bool AllowScopedEnumerations,
3931  bool Suppress, bool SuppressConversion)
3933  AllowScopedEnumerations(AllowScopedEnumerations) {}
3934 
3935  /// Match an integral or (possibly scoped) enumeration type.
3936  bool match(QualType T) override;
3937 
3940  return diagnoseNotInt(S, Loc, T);
3941  }
3942 
3943  /// Emits a diagnostic complaining that the expression does not have
3944  /// integral or enumeration type.
3945  virtual SemaDiagnosticBuilder
3946  diagnoseNotInt(Sema &S, SourceLocation Loc, QualType T) = 0;
3947  };
3948 
3949  /// Perform a contextual implicit conversion.
3951  SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter);
3952 
3953 
3958  };
3960 
3961  // Note that LK_String is intentionally after the other literals, as
3962  // this is used for diagnostics logic.
3971  };
3973 
3975  NestedNameSpecifier *Qualifier,
3976  NamedDecl *FoundDecl,
3977  NamedDecl *Member);
3978 
3979  // Members have to be NamespaceDecl* or TranslationUnitDecl*.
3980  // TODO: make this is a typesafe union.
3983 
3985 
3986  void AddOverloadCandidate(FunctionDecl *Function, DeclAccessPair FoundDecl,
3987  ArrayRef<Expr *> Args,
3988  OverloadCandidateSet &CandidateSet,
3989  bool SuppressUserConversions = false,
3990  bool PartialOverloading = false,
3991  bool AllowExplicit = true,
3992  bool AllowExplicitConversion = false,
3993  ADLCallKind IsADLCandidate = ADLCallKind::NotADL,
3994  ConversionSequenceList EarlyConversions = None,
3995  OverloadCandidateParamOrder PO = {});
3996  void AddFunctionCandidates(const UnresolvedSetImpl &Functions,
3997  ArrayRef<Expr *> Args,
3998  OverloadCandidateSet &CandidateSet,
3999  TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr,
4000  bool SuppressUserConversions = false,
4001  bool PartialOverloading = false,
4002  bool FirstArgumentIsBase = false);
4003  void AddMethodCandidate(DeclAccessPair FoundDecl,
4004  QualType ObjectType,
4005  Expr::Classification ObjectClassification,
4006  ArrayRef<Expr *> Args,
4007  OverloadCandidateSet& CandidateSet,
4008  bool SuppressUserConversion = false,
4009  OverloadCandidateParamOrder PO = {});
4010  void AddMethodCandidate(CXXMethodDecl *Method,
4011  DeclAccessPair FoundDecl,
4012  CXXRecordDecl *ActingContext, QualType ObjectType,
4013  Expr::Classification ObjectClassification,
4014  ArrayRef<Expr *> Args,
4015  OverloadCandidateSet& CandidateSet,
4016  bool SuppressUserConversions = false,
4017  bool PartialOverloading = false,
4018  ConversionSequenceList EarlyConversions = None,
4019  OverloadCandidateParamOrder PO = {});
4020  void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl,
4021  DeclAccessPair FoundDecl,
4022  CXXRecordDecl *ActingContext,
4023  TemplateArgumentListInfo *ExplicitTemplateArgs,
4024  QualType ObjectType,
4025  Expr::Classification ObjectClassification,
4026  ArrayRef<Expr *> Args,
4027  OverloadCandidateSet& CandidateSet,
4028  bool SuppressUserConversions = false,
4029  bool PartialOverloading = false,
4030  OverloadCandidateParamOrder PO = {});
4032  FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl,
4033  TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args,
4034  OverloadCandidateSet &CandidateSet, bool SuppressUserConversions = false,
4035  bool PartialOverloading = false, bool AllowExplicit = true,
4036  ADLCallKind IsADLCandidate = ADLCallKind::NotADL,
4037  OverloadCandidateParamOrder PO = {});
4039  FunctionTemplateDecl *FunctionTemplate, ArrayRef<QualType> ParamTypes,
4040  ArrayRef<Expr *> Args, OverloadCandidateSet &CandidateSet,
4041  ConversionSequenceList &Conversions, bool SuppressUserConversions,
4042  CXXRecordDecl *ActingContext = nullptr, QualType ObjectType = QualType(),
4043  Expr::Classification ObjectClassification = {},
4044  OverloadCandidateParamOrder PO = {});
4046  CXXConversionDecl *Conversion, DeclAccessPair FoundDecl,
4047  CXXRecordDecl *ActingContext, Expr *From, QualType ToType,
4048  OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit,
4049  bool AllowExplicit, bool AllowResultConversion = true);
4051  FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl,
4052  CXXRecordDecl *ActingContext, Expr *From, QualType ToType,
4053  OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit,
4054  bool AllowExplicit, bool AllowResultConversion = true);
4055  void AddSurrogateCandidate(CXXConversionDecl *Conversion,
4056  DeclAccessPair FoundDecl,
4057  CXXRecordDecl *ActingContext,
4058  const FunctionProtoType *Proto,
4059  Expr *Object, ArrayRef<Expr *> Args,
4060  OverloadCandidateSet& CandidateSet);
4062  const UnresolvedSetImpl &Functions, ArrayRef<Expr *> Args,
4063  OverloadCandidateSet &CandidateSet,
4064  TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr);
4066  SourceLocation OpLoc, ArrayRef<Expr *> Args,
4067  OverloadCandidateSet &CandidateSet,
4068  OverloadCandidateParamOrder PO = {});
4069  void AddBuiltinCandidate(QualType *ParamTys, ArrayRef<Expr *> Args,
4070  OverloadCandidateSet& CandidateSet,
4071  bool IsAssignmentOperator = false,
4072  unsigned NumContextualBoolArguments = 0);
4074  SourceLocation OpLoc, ArrayRef<Expr *> Args,
4075  OverloadCandidateSet& CandidateSet);
4076  void AddArgumentDependentLookupCandidates(DeclarationName Name,
4077  SourceLocation Loc,
4078  ArrayRef<Expr *> Args,
4079  TemplateArgumentListInfo *ExplicitTemplateArgs,
4080  OverloadCandidateSet& CandidateSet,
4081  bool PartialOverloading = false);
4082 
4083  // Emit as a 'note' the specific overload candidate
4084  void NoteOverloadCandidate(
4085  NamedDecl *Found, FunctionDecl *Fn,
4087  QualType DestType = QualType(), bool TakingAddress = false);
4088 
4089  // Emit as a series of 'note's all template and non-templates identified by
4090  // the expression Expr
4091  void NoteAllOverloadCandidates(Expr *E, QualType DestType = QualType(),
4092  bool TakingAddress = false);
4093 
4094  /// Check the enable_if expressions on the given function. Returns the first
4095  /// failing attribute, or NULL if they were all successful.
4096  EnableIfAttr *CheckEnableIf(FunctionDecl *Function, SourceLocation CallLoc,
4097  ArrayRef<Expr *> Args,
4098  bool MissingImplicitThis = false);
4099 
4100  /// Find the failed Boolean condition within a given Boolean
4101  /// constant expression, and describe it with a string.
4102  std::pair<Expr *, std::string> findFailedBooleanCondition(Expr *Cond);
4103 
4104  /// Emit diagnostics for the diagnose_if attributes on Function, ignoring any
4105  /// non-ArgDependent DiagnoseIfAttrs.
4106  ///
4107  /// Argument-dependent diagnose_if attributes should be checked each time a
4108  /// function is used as a direct callee of a function call.
4109  ///
4110  /// Returns true if any errors were emitted.
4111  bool diagnoseArgDependentDiagnoseIfAttrs(const FunctionDecl *Function,
4112  const Expr *ThisArg,
4113  ArrayRef<const Expr *> Args,
4114  SourceLocation Loc);
4115 
4116  /// Emit diagnostics for the diagnose_if attributes on Function, ignoring any
4117  /// ArgDependent DiagnoseIfAttrs.
4118  ///
4119  /// Argument-independent diagnose_if attributes should be checked on every use
4120  /// of a function.
4121  ///
4122  /// Returns true if any errors were emitted.
4123  bool diagnoseArgIndependentDiagnoseIfAttrs(const NamedDecl *ND,
4124  SourceLocation Loc);
4125 
4126  /// Returns whether the given function's address can be taken or not,
4127  /// optionally emitting a diagnostic if the address can't be taken.
4128  ///
4129  /// Returns false if taking the address of the function is illegal.
4130  bool checkAddressOfFunctionIsAvailable(const FunctionDecl *Function,
4131  bool Complain = false,
4132  SourceLocation Loc = SourceLocation());
4133 
4134  // [PossiblyAFunctionType] --> [Return]
4135  // NonFunctionType --> NonFunctionType
4136  // R (A) --> R(A)
4137  // R (*)(A) --> R (A)
4138  // R (&)(A) --> R (A)
4139  // R (S::*)(A) --> R (A)
4140  QualType ExtractUnqualifiedFunctionType(QualType PossiblyAFunctionType);
4141 
4142  FunctionDecl *
4143  ResolveAddressOfOverloadedFunction(Expr *AddressOfExpr,
4144  QualType TargetType,
4145  bool Complain,
4146  DeclAccessPair &Found,
4147  bool *pHadMultipleCandidates = nullptr);
4148 
4149  FunctionDecl *
4150  resolveAddressOfSingleOverloadCandidate(Expr *E, DeclAccessPair &FoundResult);
4151 
4153  ExprResult &SrcExpr, bool DoFunctionPointerConversion = false);
4154 
4155  FunctionDecl *
4157  bool Complain = false,
4158  DeclAccessPair *Found = nullptr);
4159 
4161  ExprResult &SrcExpr,
4162  bool DoFunctionPointerConverion = false,
4163  bool Complain = false,
4164  SourceRange OpRangeForComplaining = SourceRange(),
4165  QualType DestTypeForComplaining = QualType(),
4166  unsigned DiagIDForComplaining = 0);
4167 
4168 
4169  Expr *FixOverloadedFunctionReference(Expr *E,
4170  DeclAccessPair FoundDecl,
4171  FunctionDecl *Fn);
4173  DeclAccessPair FoundDecl,
4174  FunctionDecl *Fn);
4175 
4176  void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE,
4177  ArrayRef<Expr *> Args,
4178  OverloadCandidateSet &CandidateSet,
4179  bool PartialOverloading = false);
4181  LookupResult &R, TemplateArgumentListInfo *ExplicitTemplateArgs,
4182  ArrayRef<Expr *> Args, OverloadCandidateSet &CandidateSet);
4183 
4184  // An enum used to represent the different possible results of building a
4185  // range-based for loop.
4190  };
4191 
4193  SourceLocation RangeLoc,
4194  const DeclarationNameInfo &NameInfo,
4195  LookupResult &MemberLookup,
4196  OverloadCandidateSet *CandidateSet,
4197  Expr *Range, ExprResult *CallExpr);
4198 
4200  UnresolvedLookupExpr *ULE,
4201  SourceLocation LParenLoc,
4202  MultiExprArg Args,
4203  SourceLocation RParenLoc,
4204  Expr *ExecConfig,
4205  bool AllowTypoCorrection=true,
4206  bool CalleesAddressIsTaken=false);
4207 
4209  MultiExprArg Args, SourceLocation RParenLoc,
4210  OverloadCandidateSet *CandidateSet,
4211  ExprResult *Result);
4212 
4214  NestedNameSpecifierLoc NNSLoc,
4215  DeclarationNameInfo DNI,
4216  const UnresolvedSetImpl &Fns,
4217  bool PerformADL = true);
4218 
4220  UnaryOperatorKind Opc,
4221  const UnresolvedSetImpl &Fns,
4222  Expr *input, bool RequiresADL = true);
4223 
4224  void LookupOverloadedBinOp(OverloadCandidateSet &CandidateSet,
4226  const UnresolvedSetImpl &Fns,
4227  ArrayRef<Expr *> Args, bool RequiresADL = true);
4229  BinaryOperatorKind Opc,
4230  const UnresolvedSetImpl &Fns,
4231  Expr *LHS, Expr *RHS,
4232  bool RequiresADL = true,
4233  bool AllowRewrittenCandidates = true,
4234  FunctionDecl *DefaultedFn = nullptr);
4236  const UnresolvedSetImpl &Fns,
4237  Expr *LHS, Expr *RHS,
4238  FunctionDecl *DefaultedFn);
4239 
4241  SourceLocation RLoc, Expr *Base,
4242  MultiExprArg Args);
4243 
4245  SourceLocation LParenLoc,
4246  MultiExprArg Args,
4247  SourceLocation RParenLoc,
4248  Expr *ExecConfig = nullptr,
4249  bool IsExecConfig = false,
4250  bool AllowRecovery = false);
4251  ExprResult
4252  BuildCallToObjectOfClassType(Scope *S, Expr *Object, SourceLocation LParenLoc,
4253  MultiExprArg Args,
4254  SourceLocation RParenLoc);
4255 
4257  SourceLocation OpLoc,
4258  bool *NoArrowOperatorFound = nullptr);
4259 
4260  /// CheckCallReturnType - Checks that a call expression's return type is
4261  /// complete. Returns true on failure. The location passed in is the location
4262  /// that best represents the call.
4263  bool CheckCallReturnType(QualType ReturnType, SourceLocation Loc,
4264  CallExpr *CE, FunctionDecl *FD);
4265 
4266  /// Helpers for dealing with blocks and functions.
4268  bool CheckParameterNames);
4272 
4273  /// \name Name lookup
4274  ///
4275  /// These routines provide name lookup that is used during semantic
4276  /// analysis to resolve the various kinds of names (identifiers,
4277  /// overloaded operator names, constructor names, etc.) into zero or
4278  /// more declarations within a particular scope. The major entry
4279  /// points are LookupName, which performs unqualified name lookup,
4280  /// and LookupQualifiedName, which performs qualified name lookup.
4281  ///
4282  /// All name lookup is performed based on some specific criteria,
4283  /// which specify what names will be visible to name lookup and how
4284  /// far name lookup should work. These criteria are important both
4285  /// for capturing language semantics (certain lookups will ignore
4286  /// certain names, for example) and for performance, since name
4287  /// lookup is often a bottleneck in the compilation of C++. Name
4288  /// lookup criteria is specified via the LookupCriteria enumeration.
4289  ///
4290  /// The results of name lookup can vary based on the kind of name
4291  /// lookup performed, the current language, and the translation
4292  /// unit. In C, for example, name lookup will either return nothing
4293  /// (no entity found) or a single declaration. In C++, name lookup
4294  /// can additionally refer to a set of overloaded functions or
4295  /// result in an ambiguity. All of the possible results of name
4296  /// lookup are captured by the LookupResult class, which provides
4297  /// the ability to distinguish among them.
4298  //@{
4299 
4300  /// Describes the kind of name lookup to perform.
4302  /// Ordinary name lookup, which finds ordinary names (functions,
4303  /// variables, typedefs, etc.) in C and most kinds of names
4304  /// (functions, variables, members, types, etc.) in C++.
4306  /// Tag name lookup, which finds the names of enums, classes,
4307  /// structs, and unions.
4309  /// Label name lookup.
4311  /// Member name lookup, which finds the names of
4312  /// class/struct/union members.
4314  /// Look up of an operator name (e.g., operator+) for use with
4315  /// operator overloading. This lookup is similar to ordinary name
4316  /// lookup, but will ignore any declarations that are class members.
4318  /// Look up a name following ~ in a destructor name. This is an ordinary
4319  /// lookup, but prefers tags to typedefs.
4321  /// Look up of a name that precedes the '::' scope resolution
4322  /// operator in C++. This lookup completely ignores operator, object,
4323  /// function, and enumerator names (C++ [basic.lookup.qual]p1).
4325  /// Look up a namespace name within a C++ using directive or
4326  /// namespace alias definition, ignoring non-namespace names (C++
4327  /// [basic.lookup.udir]p1).
4329  /// Look up all declarations in a scope with the given name,
4330  /// including resolved using declarations. This is appropriate
4331  /// for checking redeclarations for a using declaration.
4333  /// Look up an ordinary name that is going to be redeclared as a
4334  /// name with linkage. This lookup ignores any declarations that
4335  /// are outside of the current scope unless they have linkage. See
4336  /// C99 6.2.2p4-5 and C++ [basic.link]p6.
4338  /// Look up a friend of a local class. This lookup does not look
4339  /// outside the innermost non-class scope. See C++11 [class.friend]p11.
4341  /// Look up the name of an Objective-C protocol.
4343  /// Look up implicit 'self' parameter of an objective-c method.
4345  /// Look up the name of an OpenMP user-defined reduction operation.
4347  /// Look up the name of an OpenMP user-defined mapper.
4349  /// Look up any declaration with any name.
4351  };
4352 
4353  /// Specifies whether (or how) name lookup is being performed for a
4354  /// redeclaration (vs. a reference).
4356  /// The lookup is a reference to this name that is not for the
4357  /// purpose of redeclaring the name.
4359  /// The lookup results will be used for redeclaration of a name,
4360  /// if an entity by that name already exists and is visible.
4362  /// The lookup results will be used for redeclaration of a name
4363  /// with external linkage; non-visible lookup results with external linkage
4364  /// may also be found.
4366  };
4367 
4369  // A declaration with an owning module for linkage can never link against
4370  // anything that is not visible. We don't need to check linkage here; if
4371  // the context has internal linkage, redeclaration lookup won't find things
4372  // from other TUs, and we can't safely compute linkage yet in general.
4373  if (cast<Decl>(CurContext)
4374  ->getOwningModuleForLinkage(/*IgnoreLinkage*/true))
4375  return ForVisibleRedeclaration;
4376  return ForExternalRedeclaration;
4377  }
4378 
4379  /// The possible outcomes of name lookup for a literal operator.
4381  /// The lookup resulted in an error.
4383  /// The lookup found no match but no diagnostic was issued.
4385  /// The lookup found a single 'cooked' literal operator, which
4386  /// expects a normal literal to be built and passed to it.
4388  /// The lookup found a single 'raw' literal operator, which expects
4389  /// a string literal containing the spelling of the literal token.
4391  /// The lookup found an overload set of literal operator templates,
4392  /// which expect the characters of the spelling of the literal token to be
4393  /// passed as a non-type template argument pack.
4395  /// The lookup found an overload set of literal operator templates,
4396  /// which expect the character type and characters of the spelling of the
4397  /// string literal token to be passed as template arguments.
4399  };
4400 
4401  SpecialMemberOverloadResult LookupSpecialMember(CXXRecordDecl *D,
4403  bool ConstArg,
4404  bool VolatileArg,
4405  bool RValueThis,
4406  bool ConstThis,
4407  bool VolatileThis);
4408 
4409  typedef std::function<void(const TypoCorrection &)> TypoDiagnosticGenerator;
4410  typedef std::function<ExprResult(Sema &, TypoExpr *, TypoCorrection)>
4412 
4413 private:
4414  bool CppLookupName(LookupResult &R, Scope *S);
4415 
4416  struct TypoExprState {
4417  std::unique_ptr<TypoCorrectionConsumer> Consumer;
4418  TypoDiagnosticGenerator DiagHandler;
4419  TypoRecoveryCallback RecoveryHandler;
4420  TypoExprState();
4421  TypoExprState(TypoExprState &&other) noexcept;
4422  TypoExprState &operator=(TypoExprState &&other) noexcept;
4423  };
4424 
4425  /// The set of unhandled TypoExprs and their associated state.
4426  llvm::MapVector<TypoExpr *, TypoExprState> DelayedTypos;
4427 
4428  /// Creates a new TypoExpr AST node.
4429  TypoExpr *createDelayedTypo(std::unique_ptr<TypoCorrectionConsumer> TCC,
4431  TypoRecoveryCallback TRC, SourceLocation TypoLoc);
4432 
4433  // The set of known/encountered (unique, canonicalized) NamespaceDecls.
4434  //
4435  // The boolean value will be true to indicate that the namespace was loaded
4436  // from an AST/PCH file, or false otherwise.
4437  llvm::MapVector<NamespaceDecl*, bool> KnownNamespaces;
4438 
4439  /// Whether we have already loaded known namespaces from an extenal
4440  /// source.
4441  bool LoadedExternalKnownNamespaces;
4442 
4443  /// Helper for CorrectTypo and CorrectTypoDelayed used to create and
4444  /// populate a new TypoCorrectionConsumer. Returns nullptr if typo correction
4445  /// should be skipped entirely.
4446  std::unique_ptr<TypoCorrectionConsumer>
4447  makeTypoCorrectionConsumer(const DeclarationNameInfo &Typo,
4448  Sema::LookupNameKind LookupKind, Scope *S,
4449  CXXScopeSpec *SS,
4451  DeclContext *MemberContext, bool EnteringContext,
4452  const ObjCObjectPointerType *OPT,
4453  bool ErrorRecovery);
4454 
4455 public:
4456  const TypoExprState &getTypoExprState(TypoExpr *TE) const;
4457 
4458  /// Clears the state of the given TypoExpr.
4459  void clearDelayedTypo(TypoExpr *TE);
4460 
4461  /// Look up a name, looking for a single declaration. Return
4462  /// null if the results were absent, ambiguous, or overloaded.
4463  ///
4464  /// It is preferable to use the elaborated form and explicitly handle
4465  /// ambiguity and overloaded.
4467  SourceLocation Loc,
4468  LookupNameKind NameKind,
4469  RedeclarationKind Redecl
4471  bool LookupBuiltin(LookupResult &R);
4472  void LookupNecessaryTypesForBuiltin(Scope *S, unsigned ID);
4473  bool LookupName(LookupResult &R, Scope *S,
4474  bool AllowBuiltinCreation = false);
4475  bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
4476  bool InUnqualifiedLookup = false);
4477  bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx,
4478  CXXScopeSpec &SS);
4480  bool AllowBuiltinCreation = false,
4481  bool EnteringContext = false);
4483  RedeclarationKind Redecl
4485  bool LookupInSuper(LookupResult &R, CXXRecordDecl *Class);
4486 
4488  UnresolvedSetImpl &Functions);
4489 
4491  SourceLocation GnuLabelLoc = SourceLocation());
4492 
4496  unsigned Quals);
4497  CXXMethodDecl *LookupCopyingAssignment(CXXRecordDecl *Class, unsigned Quals,
4498  bool RValueThis, unsigned ThisQuals);
4500  unsigned Quals);
4501  CXXMethodDecl *LookupMovingAssignment(CXXRecordDecl *Class, unsigned Quals,
4502  bool RValueThis, unsigned ThisQuals);
4504 
4505  bool checkLiteralOperatorId(const CXXScopeSpec &SS, const UnqualifiedId &Id,
4506  bool IsUDSuffix);
4509  bool AllowRaw, bool AllowTemplate,
4510  bool AllowStringTemplate, bool DiagnoseMissing,
4511  StringLiteral *StringLit = nullptr);
4512  bool isKnownName(StringRef name);
4513 
4514  /// Status of the function emission on the CUDA/HIP/OpenMP host/device attrs.
4516  Emitted,
4517  CUDADiscarded, // Discarded due to CUDA/HIP hostness
4518  OMPDiscarded, // Discarded due to OpenMP hostness
4519  TemplateDiscarded, // Discarded due to uninstantiated templates
4520  Unknown,
4521  };
4523  bool Final = false);
4525 
4526  // Whether the callee should be ignored in CUDA/HIP/OpenMP host/device check.
4528 
4530  ArrayRef<Expr *> Args, ADLResult &Functions);
4531 
4534  bool IncludeGlobalScope = true,
4535  bool LoadExternal = true);
4538  bool IncludeGlobalScope = true,
4539  bool IncludeDependentBases = false,
4540  bool LoadExternal = true);
4541 
4543  CTK_NonError, // CorrectTypo used in a non error recovery situation.
4544  CTK_ErrorRecovery // CorrectTypo used in normal error recovery.
4545  };
4546 
4548  Sema::LookupNameKind LookupKind,
4549  Scope *S, CXXScopeSpec *SS,
4551  CorrectTypoKind Mode,
4552  DeclContext *MemberContext = nullptr,
4553  bool EnteringContext = false,
4554  const ObjCObjectPointerType *OPT = nullptr,
4555  bool RecordFailure = true);
4556 
4558  Sema::LookupNameKind LookupKind, Scope *S,
4559  CXXScopeSpec *SS,
4563  DeclContext *MemberContext = nullptr,
4564  bool EnteringContext = false,
4565  const ObjCObjectPointerType *OPT = nullptr);
4566 
4567  /// Process any TypoExprs in the given Expr and its children,
4568  /// generating diagnostics as appropriate and returning a new Expr if there
4569  /// were typos that were all successfully corrected and ExprError if one or
4570  /// more typos could not be corrected.
4571  ///
4572  /// \param E The Expr to check for TypoExprs.
4573  ///
4574  /// \param InitDecl A VarDecl to avoid because the Expr being corrected is its
4575  /// initializer.
4576  ///
4577  /// \param RecoverUncorrectedTypos If true, when typo correction fails, it
4578  /// will rebuild the given Expr with all TypoExprs degraded to RecoveryExprs.
4579  ///
4580  /// \param Filter A function applied to a newly rebuilt Expr to determine if
4581  /// it is an acceptable/usable result from a single combination of typo
4582  /// corrections. As long as the filter returns ExprError, different
4583  /// combinations of corrections will be tried until all are exhausted.
4585  Expr *E, VarDecl *InitDecl = nullptr,
4586  bool RecoverUncorrectedTypos = false,
4587  llvm::function_ref<ExprResult(Expr *)> Filter =
4588  [](Expr *E) -> ExprResult { return E; });
4589 
4591  ExprResult ER, VarDecl *InitDecl = nullptr,
4592  bool RecoverUncorrectedTypos = false,
4593  llvm::function_ref<ExprResult(Expr *)> Filter =
4594  [](Expr *E) -> ExprResult { return E; }) {
4595  return ER.isInvalid()
4596  ? ER
4597  : CorrectDelayedTyposInExpr(ER.get(), InitDecl,
4598  RecoverUncorrectedTypos, Filter);
4599  }
4600 
4601  void diagnoseTypo(const TypoCorrection &Correction,
4602  const PartialDiagnostic &TypoDiag,
4603  bool ErrorRecovery = true);
4604 
4605  void diagnoseTypo(const TypoCorrection &Correction,
4606  const PartialDiagnostic &TypoDiag,
4607  const PartialDiagnostic &PrevNote,
4608  bool ErrorRecovery = true);
4609 
4610  void MarkTypoCorrectedFunctionDefinition(const NamedDecl *F);
4611 
4612  void FindAssociatedClassesAndNamespaces(SourceLocation InstantiationLoc,
4613  ArrayRef<Expr *> Args,
4614  AssociatedNamespaceSet &AssociatedNamespaces,
4615  AssociatedClassSet &AssociatedClasses);
4616 
4617  void FilterLookupForScope(LookupResult &R, DeclContext *Ctx, Scope *S,
4618  bool ConsiderLinkage, bool AllowInlineNamespace);
4619 
4620  bool CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old);
4621  bool CheckRedeclarationExported(NamedDecl *New, NamedDecl *Old);
4622  bool CheckRedeclarationInModule(NamedDecl *New, NamedDecl *Old);
4623 
4624  void DiagnoseAmbiguousLookup(LookupResult &Result);
4625  //@}
4626 
4627  /// Attempts to produce a RecoveryExpr after some AST node cannot be created.
4628  ExprResult CreateRecoveryExpr(SourceLocation Begin, SourceLocation End,
4629  ArrayRef<Expr *> SubExprs,
4630  QualType T = QualType());
4631 
4632  ObjCInterfaceDecl *getObjCInterfaceDecl(IdentifierInfo *&Id,
4633  SourceLocation IdLoc,
4634  bool TypoCorrection = false);
4635  FunctionDecl *CreateBuiltin(IdentifierInfo *II, QualType Type, unsigned ID,
4636  SourceLocation Loc);
4637  NamedDecl *LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID,
4638  Scope *S, bool ForRedeclaration,
4639  SourceLocation Loc);
4640  NamedDecl *ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II,
4641  Scope *S);
4643  FunctionDecl *FD);
4644  void AddKnownFunctionAttributes(FunctionDecl *FD);
4645 
4646  // More parsing and symbol table subroutines.
4647 
4648  void ProcessPragmaWeak(Scope *S, Decl *D);
4649  // Decl attributes - this routine is the top level dispatcher.
4650  void ProcessDeclAttributes(Scope *S, Decl *D, const Declarator &PD);
4651  // Helper for delayed processing of attributes.
4652  void ProcessDeclAttributeDelayed(Decl *D,
4653  const ParsedAttributesView &AttrList);
4654  void ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AL,
4655  bool IncludeCXX11Attributes = true);
4656  bool ProcessAccessDeclAttributeList(AccessSpecDecl *ASDecl,
4657  const ParsedAttributesView &AttrList);
4658 
4659  void checkUnusedDeclAttributes(Declarator &D);
4660 
4661  /// Handles semantic checking for features that are common to all attributes,
4662  /// such as checking whether a parameter was properly specified, or the
4663  /// correct number of arguments were passed, etc. Returns true if the
4664  /// attribute has been diagnosed.
4665  bool checkCommonAttributeFeatures(const Decl *D, const ParsedAttr &A,
4666  bool SkipArgCountCheck = false);
4667  bool checkCommonAttributeFeatures(const Stmt *S, const ParsedAttr &A,
4668  bool SkipArgCountCheck = false);
4669 
4670  /// Determine if type T is a valid subject for a nonnull and similar
4671  /// attributes. By default, we look through references (the behavior used by
4672  /// nonnull), but if the second parameter is true, then we treat a reference
4673  /// type as valid.
4674  bool isValidPointerAttrType(QualType T, bool RefOkay = false);
4675 
4676  bool CheckRegparmAttr(const ParsedAttr &attr, unsigned &value);
4677  bool CheckCallingConvAttr(const ParsedAttr &attr, CallingConv &CC,
4678  const FunctionDecl *FD = nullptr);
4679  bool CheckAttrTarget(const ParsedAttr &CurrAttr);
4680  bool CheckAttrNoArgs(const ParsedAttr &CurrAttr);
4681  bool checkStringLiteralArgumentAttr(const AttributeCommonInfo &CI,
4682  const Expr *E, StringRef &Str,
4683  SourceLocation *ArgLocation = nullptr);
4684  bool checkStringLiteralArgumentAttr(const ParsedAttr &Attr, unsigned ArgNum,
4685  StringRef &Str,
4686  SourceLocation *ArgLocation = nullptr);
4687  llvm::Error isValidSectionSpecifier(StringRef Str);
4688  bool checkSectionName(SourceLocation LiteralLoc, StringRef Str);
4689  bool checkTargetAttr(SourceLocation LiteralLoc, StringRef Str);
4690  bool checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str,
4691  const StringLiteral *Literal,
4692  bool &HasDefault, bool &HasCommas,
4693  SmallVectorImpl<StringRef> &Strings);
4695  CXXRecordDecl *RD, SourceRange Range, bool BestCase,
4696  MSInheritanceModel SemanticSpelling);
4697 
4698  void CheckAlignasUnderalignment(Decl *D);
4699 
4700  /// Adjust the calling convention of a method to be the ABI default if it
4701  /// wasn't specified explicitly. This handles method types formed from
4702  /// function type typedefs and typename template arguments.
4703  void adjustMemberFunctionCC(QualType &T, bool IsStatic, bool IsCtorOrDtor,
4704  SourceLocation Loc);
4705 
4706  // Check if there is an explicit attribute, but only look through parens.
4707  // The intent is to look for an attribute on the current declarator, but not
4708  // one that came from a typedef.
4709  bool hasExplicitCallingConv(QualType T);
4710 
4711  /// Get the outermost AttributedType node that sets a calling convention.
4712  /// Valid types should not have multiple attributes with different CCs.
4713  const AttributedType *getCallingConvAttributedType(QualType T) const;
4714 
4715  /// Process the attributes before creating an attributed statement. Returns
4716  /// the semantic attributes that have been processed.
4717  void ProcessStmtAttributes(Stmt *Stmt, const ParsedAttributes &InAttrs,
4718  SmallVectorImpl<const Attr *> &OutAttrs);
4719 
4720  void WarnConflictingTypedMethods(ObjCMethodDecl *Method,
4721  ObjCMethodDecl *MethodDecl,
4722  bool IsProtocolMethodDecl);
4723 
4724  void CheckConflictingOverridingMethod(ObjCMethodDecl *Method,
4725  ObjCMethodDecl *Overridden,
4726  bool IsProtocolMethodDecl);
4727 
4728  /// WarnExactTypedMethods - This routine issues a warning if method
4729  /// implementation declaration matches exactly that of its declaration.
4730  void WarnExactTypedMethods(ObjCMethodDecl *Method,
4731  ObjCMethodDecl *MethodDecl,
4732  bool IsProtocolMethodDecl);
4733 
4735 
4736  /// CheckImplementationIvars - This routine checks if the instance variables
4737  /// listed in the implelementation match those listed in the interface.
4739  ObjCIvarDecl **Fields, unsigned nIvars,
4740  SourceLocation Loc);
4741 
4742  /// ImplMethodsVsClassMethods - This is main routine to warn if any method
4743  /// remains unimplemented in the class or category \@implementation.
4744  void ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl* IMPDecl,
4745  ObjCContainerDecl* IDecl,
4746  bool IncompleteImpl = false);
4747 
4748  /// DiagnoseUnimplementedProperties - This routine warns on those properties
4749  /// which must be implemented by this implementation.
4751  ObjCContainerDecl *CDecl,
4752  bool SynthesizeProperties);
4753 
4754  /// Diagnose any null-resettable synthesized setters.
4756 
4757  /// DefaultSynthesizeProperties - This routine default synthesizes all
4758  /// properties which must be synthesized in the class's \@implementation.
4760  ObjCInterfaceDecl *IDecl,
4761  SourceLocation AtEnd);
4763 
4764  /// IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is
4765  /// an ivar synthesized for 'Method' and 'Method' is a property accessor
4766  /// declared in class 'IFace'.
4768  ObjCMethodDecl *Method, ObjCIvarDecl *IV);
4769 
4770  /// DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which
4771  /// backs the property is not used in the property's accessor.
4773  const ObjCImplementationDecl *ImplD);
4774 
4775  /// GetIvarBackingPropertyAccessor - If method is a property setter/getter and
4776  /// it property has a backing ivar, returns this ivar; otherwise, returns NULL.
4777  /// It also returns ivar's property on success.
4779  const ObjCPropertyDecl *&PDecl) const;
4780 
4781  /// Called by ActOnProperty to handle \@property declarations in
4782  /// class extensions.
4784  SourceLocation AtLoc,
4785  SourceLocation LParenLoc,
4786  FieldDeclarator &FD,
4787  Selector GetterSel,
4788  SourceLocation GetterNameLoc,
4789  Selector SetterSel,
4790  SourceLocation SetterNameLoc,
4791  const bool isReadWrite,
4792  unsigned &Attributes,
4793  const unsigned AttributesAsWritten,
4794  QualType T,
4795  TypeSourceInfo *TSI,
4796  tok::ObjCKeywordKind MethodImplKind);
4797 
4798  /// Called by ActOnProperty and HandlePropertyInClassExtension to
4799  /// handle creating the ObjcPropertyDecl for a category or \@interface.
4801  ObjCContainerDecl *CDecl,
4802  SourceLocation AtLoc,
4803  SourceLocation LParenLoc,
4804  FieldDeclarator &FD,
4805  Selector GetterSel,
4806  SourceLocation GetterNameLoc,
4807  Selector SetterSel,
4808  SourceLocation SetterNameLoc,
4809  const bool isReadWrite,
4810  const unsigned Attributes,
4811  const unsigned AttributesAsWritten,
4812  QualType T,
4813  TypeSourceInfo *TSI,
4814  tok::ObjCKeywordKind MethodImplKind,
4815  DeclContext *lexicalDC = nullptr);
4816 
4817  /// AtomicPropertySetterGetterRules - This routine enforces the rule (via
4818  /// warning) when atomic property has one but not the other user-declared
4819  /// setter or getter.
4821  ObjCInterfaceDecl* IDecl);
4822 
4824 
4826  const ObjCImplementationDecl *ImplD,
4827  const ObjCInterfaceDecl *IFD);
4828 
4830 
4834  };
4835 
4836  /// MatchTwoMethodDeclarations - Checks if two methods' type match and returns
4837  /// true, or false, accordingly.
4838  bool MatchTwoMethodDeclarations(const ObjCMethodDecl *Method,
4839  const ObjCMethodDecl *PrevMethod,
4840  MethodMatchStrategy strategy = MMS_strict);
4841 
4842  /// MatchAllMethodDeclarations - Check methods declaraed in interface or
4843  /// or protocol against those declared in their implementations.
4844  void MatchAllMethodDeclarations(const SelectorSet &InsMap,
4845  const SelectorSet &ClsMap,
4846  SelectorSet &InsMapSeen,
4847  SelectorSet &ClsMapSeen,
4848  ObjCImplDecl* IMPDecl,
4849  ObjCContainerDecl* IDecl,
4850  bool &IncompleteImpl,
4851  bool ImmediateClass,
4852  bool WarnCategoryMethodImpl=false);
4853 
4854  /// CheckCategoryVsClassMethodMatches - Checks that methods implemented in
4855  /// category matches with those implemented in its primary class and
4856  /// warns each time an exact match is found.
4858 
4859  /// Add the given method to the list of globally-known methods.
4861 
4862  /// Returns default addr space for method qualifiers.
4864 
4865 private:
4866  /// AddMethodToGlobalPool - Add an instance or factory method to the global
4867  /// pool. See descriptoin of AddInstanceMethodToGlobalPool.
4868  void AddMethodToGlobalPool(ObjCMethodDecl *Method, bool impl, bool instance);
4869 
4870  /// LookupMethodInGlobalPool - Returns the instance or factory method and
4871  /// optionally warns if there are multiple signatures.
4872  ObjCMethodDecl *LookupMethodInGlobalPool(Selector Sel, SourceRange R,
4873  bool receiverIdOrClass,
4874  bool instance);
4875 
4876 public:
4877  /// - Returns instance or factory methods in global method pool for
4878  /// given selector. It checks the desired kind first, if none is found, and
4879  /// parameter checkTheOther is set, it then checks the other kind. If no such
4880  /// method or only one method is found, function returns false; otherwise, it
4881  /// returns true.
4882  bool
4885  bool InstanceFirst, bool CheckTheOther,
4886  const ObjCObjectType *TypeBound = nullptr);
4887 
4888  bool
4890  SourceRange R, bool receiverIdOrClass,
4892 
4893  void
4895  Selector Sel, SourceRange R,
4896  bool receiverIdOrClass);
4897 
4898 private:
4899  /// - Returns a selector which best matches given argument list or
4900  /// nullptr if none could be found
4901  ObjCMethodDecl *SelectBestMethod(Selector Sel, MultiExprArg Args,
4902  bool IsInstance,
4904 
4905 
4906  /// Record the typo correction failure and return an empty correction.
4907  TypoCorrection FailedCorrection(IdentifierInfo *Typo, SourceLocation TypoLoc,
4908  bool RecordFailure = true) {
4909  if (RecordFailure)
4910  TypoCorrectionFailures[Typo].insert(TypoLoc);
4911  return TypoCorrection();
4912  }
4913 
4914 public:
4915  /// AddInstanceMethodToGlobalPool - All instance methods in a translation
4916  /// unit are added to a global pool. This allows us to efficiently associate
4917  /// a selector with a method declaraation for purposes of typechecking
4918  /// messages sent to "id" (where the class of the object is unknown).
4919  void AddInstanceMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false) {
4920  AddMethodToGlobalPool(Method, impl, /*instance*/true);
4921  }
4922 
4923  /// AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
4924  void AddFactoryMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false) {
4925  AddMethodToGlobalPool(Method, impl, /*instance*/false);
4926  }
4927 
4928  /// AddAnyMethodToGlobalPool - Add any method, instance or factory to global
4929  /// pool.
4930  void AddAnyMethodToGlobalPool(Decl *D);
4931 
4932  /// LookupInstanceMethodInGlobalPool - Returns the method and warns if
4933  /// there are multiple signatures.
4935  bool receiverIdOrClass=false) {
4936  return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
4937  /*instance*/true);
4938  }
4939 
4940  /// LookupFactoryMethodInGlobalPool - Returns the method and warns if
4941  /// there are multiple signatures.
4943  bool receiverIdOrClass=false) {
4944  return LookupMethodInGlobalPool(Sel, R, receiverIdOrClass,
4945  /*instance*/false);
4946  }
4947 
4949  QualType ObjectType=QualType());
4950  /// LookupImplementedMethodInGlobalPool - Returns the method which has an
4951  /// implementation.
4953 
4954  /// CollectIvarsToConstructOrDestruct - Collect those ivars which require
4955  /// initialization.
4958 
4959  //===--------------------------------------------------------------------===//
4960  // Statement Parsing Callbacks: SemaStmt.cpp.
4961 public:
4962  class FullExprArg {
4963  public:
4964  FullExprArg() : E(nullptr) { }
4965  FullExprArg(Sema &actions) : E(nullptr) { }
4966 
4968  return E;
4969  }
4970 
4971  Expr *get() const { return E; }
4972 
4974  return E;
4975  }
4976 
4977  private:
4978  // FIXME: No need to make the entire Sema class a friend when it's just
4979  // Sema::MakeFullExpr that needs access to the constructor below.
4980  friend class Sema;
4981 
4982  explicit FullExprArg(Expr *expr) : E(expr) {}
4983 
4984  Expr *E;
4985  };
4986 
4988  return MakeFullExpr(Arg, Arg ? Arg->getExprLoc() : SourceLocation());
4989  }
4991  return FullExprArg(
4992  ActOnFinishFullExpr(Arg, CC, /*DiscardedValue*/ false).get());
4993  }
4995  ExprResult FE =
4996  ActOnFinishFullExpr(Arg, Arg ? Arg->getExprLoc() : SourceLocation(),
4997  /*DiscardedValue*/ true);
4998  return FullExprArg(FE.get());
4999  }
5000 
5001  StmtResult ActOnExprStmt(ExprResult Arg, bool DiscardedValue = true);
5003 
5005  bool HasLeadingEmptyMacro = false);
5006 
5007  void ActOnStartOfCompoundStmt(bool IsStmtExpr);
5011  ArrayRef<Stmt *> Elts, bool isStmtExpr);
5012 
5013  /// A RAII object to enter scope of a compound statement.
5015  public:
5016  CompoundScopeRAII(Sema &S, bool IsStmtExpr = false) : S(S) {
5017  S.ActOnStartOfCompoundStmt(IsStmtExpr);
5018  }
5019 
5021  S.ActOnFinishOfCompoundStmt();
5022  }
5023 
5024  private:
5025  Sema &S;
5026  };
5027 
5028  /// An RAII helper that pops function a function scope on exit.
5031  bool Active;
5034  if (Active)
5036  }
5037  void disable() { Active = false; }
5038  };
5039 
5041  SourceLocation StartLoc,
5042  SourceLocation EndLoc);
5047  SourceLocation DotDotDotLoc, ExprResult RHS,
5048  SourceLocation ColonLoc);
5049  void ActOnCaseStmtBody(Stmt *CaseStmt, Stmt *SubStmt);
5050 
5052  SourceLocation ColonLoc,
5053  Stmt *SubStmt, Scope *CurScope);
5055  SourceLocation ColonLoc, Stmt *SubStmt);
5056 
5058  ArrayRef<const Attr *> Attrs, Stmt *SubStmt);
5060  Stmt *SubStmt);
5062 
5063  class ConditionResult;
5064 
5066  SourceLocation LParenLoc, Stmt *InitStmt,
5067  ConditionResult Cond, SourceLocation RParenLoc,
5068  Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal);
5070  SourceLocation LParenLoc, Stmt *InitStmt,
5071  ConditionResult Cond, SourceLocation RParenLoc,
5072  Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal);
5074  SourceLocation LParenLoc, Stmt *InitStmt,
5075  ConditionResult Cond,
5076  SourceLocation RParenLoc);
5078  Stmt *Switch, Stmt *Body);
5080  ConditionResult Cond, SourceLocation RParenLoc,
5081  Stmt *Body);
5083  SourceLocation WhileLoc, SourceLocation CondLParen,
5084  Expr *Cond, SourceLocation CondRParen);
5085 
5087  SourceLocation LParenLoc,
5088  Stmt *First,
5089  ConditionResult Second,
5090  FullExprArg Third,
5091  SourceLocation RParenLoc,
5092  Stmt *Body);
5094  Expr *collection);
5096  Stmt *First, Expr *collection,
5097  SourceLocation RParenLoc);
5098  StmtResult FinishObjCForCollectionStmt(Stmt *ForCollection, Stmt *Body);
5099 
5101  /// Initial building of a for-range statement.
5103  /// Instantiation or recovery rebuild of a for-range statement. Don't
5104  /// attempt any typo-correction.
5106  /// Determining whether a for-range statement could be built. Avoid any
5107  /// unnecessary or irreversible actions.
5109  };
5110 
5112  SourceLocation CoawaitLoc,
5113  Stmt *InitStmt,
5114  Stmt *LoopVar,
5115  SourceLocation ColonLoc, Expr *Collection,
5116  SourceLocation RParenLoc,
5119  SourceLocation CoawaitLoc,
5120  Stmt *InitStmt,
5121  SourceLocation ColonLoc,
5122  Stmt *RangeDecl, Stmt *Begin, Stmt *End,
5123  Expr *Cond, Expr *Inc,
5124  Stmt *LoopVarDecl,
5125  SourceLocation RParenLoc,
5127  StmtResult FinishCXXForRangeStmt(Stmt *ForRange, Stmt *Body);
5128 
5130  SourceLocation LabelLoc,
5131  LabelDecl *TheDecl);
5133  SourceLocation StarLoc,
5134  Expr *DestExp);
5135  StmtResult ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope);
5136  StmtResult ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope);
5137 
5138  void ActOnCapturedRegionStart(SourceLocation Loc, Scope *CurScope,
5139  CapturedRegionKind Kind, unsigned NumParams);
5140  typedef std::pair<StringRef, QualType> CapturedParamNameType;
5141  void ActOnCapturedRegionStart(SourceLocation Loc, Scope *CurScope,
5144  unsigned OpenMPCaptureLevel = 0);
5146  void ActOnCapturedRegionError();
5148  SourceLocation Loc,
5149  unsigned NumParams);
5150 
5153 
5156 
5157  bool isMoveEligible() const { return S != None; };
5158  bool isCopyElidable() const { return S == MoveEligibleAndCopyElidable; }
5159  };
5161  NamedReturnInfo getNamedReturnInfo(
5163  NamedReturnInfo getNamedReturnInfo(const VarDecl *VD);
5164  const VarDecl *getCopyElisionCandidate(NamedReturnInfo &Info,
5165  QualType ReturnType);
5166 
5167  ExprResult
5169  const NamedReturnInfo &NRInfo, Expr *Value,
5170  bool SupressSimplerImplicitMoves = false);
5171 
5172  StmtResult ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp,
5173  Scope *CurScope);
5174  StmtResult BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp,
5175  bool AllowRecovery = false);
5176  StmtResult ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp,
5177  NamedReturnInfo &NRInfo,
5178  bool SupressSimplerImplicitMoves);
5179 
5180  StmtResult ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple,
5181  bool IsVolatile, unsigned NumOutputs,
5182  unsigned NumInputs, IdentifierInfo **Names,
5183  MultiExprArg Constraints, MultiExprArg Exprs,
5184  Expr *AsmString, MultiExprArg Clobbers,
5185  unsigned NumLabels,
5186  SourceLocation RParenLoc);
5187 
5189  llvm::InlineAsmIdentifierInfo &Info);
5191  SourceLocation TemplateKWLoc,
5192  UnqualifiedId &Id,
5193  bool IsUnevaluatedContext);
5194  bool LookupInlineAsmField(StringRef Base, StringRef Member,
5195  unsigned &Offset, SourceLocation AsmLoc);
5196  ExprResult LookupInlineAsmVarDeclField(Expr *RefExpr, StringRef Member,
5197  SourceLocation AsmLoc);
5199  ArrayRef<Token> AsmToks,
5200  StringRef AsmString,
5201  unsigned NumOutputs, unsigned NumInputs,
5202  ArrayRef<StringRef> Constraints,
5203  ArrayRef<StringRef> Clobbers,
5204  ArrayRef<Expr*> Exprs,
5205  SourceLocation EndLoc);
5206  LabelDecl *GetOrCreateMSAsmLabel(StringRef ExternalLabelName,
5207  SourceLocation Location,
5208  bool AlwaysCreate);
5209 
5210  VarDecl *BuildObjCExceptionDecl(TypeSourceInfo *TInfo, QualType ExceptionType,
5211  SourceLocation StartLoc,
5213  bool Invalid = false);
5214 
5216 
5218  Decl *Parm, Stmt *Body);
5219 
5221 
5223  MultiStmtArg Catch, Stmt *Finally);
5224 
5227  Scope *CurScope);
5229  Expr *operand);
5231  Expr *SynchExpr,
5232  Stmt *SynchBody);
5233 
5235 
5237  SourceLocation StartLoc,
5238  SourceLocation IdLoc,
5239  IdentifierInfo *Id);
5240 
5242 
5244  Decl *ExDecl, Stmt *HandlerBlock);
5245  StmtResult ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock,
5246  ArrayRef<Stmt *> Handlers);
5247 
5248  StmtResult ActOnSEHTryBlock(bool IsCXXTry, // try (true) or __try (false) ?
5249  SourceLocation TryLoc, Stmt *TryBlock,
5250  Stmt *Handler);
5252  Expr *FilterExpr,
5253  Stmt *Block);
5258 
5260 
5261  bool ShouldWarnIfUnusedFileScopedDecl(const DeclaratorDecl *D) const;
5262 
5263  /// If it's a file scoped decl that must warn if not used, keep track
5264  /// of it.
5266 
5267  /// DiagnoseUnusedExprResult - If the statement passed in is an expression
5268  /// whose result is unused, warn.
5269  void DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID);
5271  void DiagnoseUnusedDecl(const NamedDecl *ND);
5272 
5273  /// If VD is set but not otherwise used, diagnose, for a parameter or a
5274  /// variable.
5275  void DiagnoseUnusedButSetDecl(const VarDecl *VD);
5276 
5277  /// Emit \p DiagID if statement located on \p StmtLoc has a suspicious null
5278  /// statement as a \p Body, and it is located on the same line.
5279  ///
5280  /// This helps prevent bugs due to typos, such as:
5281  /// if (condition);
5282  /// do_stuff();
5284  const Stmt *Body,
5285  unsigned DiagID);
5286 
5287  /// Warn if a for/while loop statement \p S, which is followed by
5288  /// \p PossibleBody, has a suspicious null statement as a body.
5289  void DiagnoseEmptyLoopBody(const Stmt *S,
5290  const Stmt *PossibleBody);
5291 
5292  /// Warn if a value is moved to itself.
5293  void DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr,
5294  SourceLocation OpLoc);
5295 
5296  /// Warn if we're implicitly casting from a _Nullable pointer type to a
5297  /// _Nonnull one.
5299  SourceLocation Loc);
5300 
5301  /// Warn when implicitly casting 0 to nullptr.
5303 
5305  return DelayedDiagnostics.push(pool);
5306  }
5308 
5311  ParsingClassDepth++;
5313  }
5315  ParsingClassDepth--;
5317  }
5318 
5320 
5322  const ObjCInterfaceDecl *UnknownObjCClass,
5323  bool ObjCPropertyAccess,
5324  bool AvoidPartialAvailabilityChecks = false,
5325  ObjCInterfaceDecl *ClassReceiver = nullptr);
5326 
5328  UnavailableAttr::ImplicitReason reason);
5329 
5330  /// Issue any -Wunguarded-availability warnings in \c FD
5332 
5334 
5335  //===--------------------------------------------------------------------===//
5336  // Expression Parsing Callbacks: SemaExpr.cpp.
5337 
5338  bool CanUseDecl(NamedDecl *D, bool TreatUnavailableAsInvalid);
5340  const ObjCInterfaceDecl *UnknownObjCClass = nullptr,
5341  bool ObjCPropertyAccess = false,
5342  bool AvoidPartialAvailabilityChecks = false,
5343  ObjCInterfaceDecl *ClassReciever = nullptr);
5347  ObjCMethodDecl *Getter,
5348  SourceLocation Loc);
5350  ArrayRef<Expr *> Args);
5351 
5353  ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl = nullptr,
5362 
5364 
5368 
5371 
5373 
5374  // Functions for marking a declaration referenced. These functions also
5375  // contain the relevant logic for marking if a reference to a function or
5376  // variable is an odr-use (in the C++11 sense). There are separate variants
5377  // for expressions referring to a decl; these exist because odr-use marking
5378  // needs to be delayed for some constant variables when we build one of the
5379  // named expressions.
5380  //
5381  // MightBeOdrUse indicates whether the use could possibly be an odr-use, and
5382  // should usually be true. This only needs to be set to false if the lack of
5383  // odr-use cannot be determined from the current context (for instance,
5384  // because the name denotes a virtual function and was written without an
5385  // explicit nested-name-specifier).
5386  void MarkAnyDeclReferenced(SourceLocation Loc, Decl *D, bool MightBeOdrUse);
5388  bool MightBeOdrUse = true);
5390  void MarkDeclRefReferenced(DeclRefExpr *E, const Expr *Base = nullptr);
5394  unsigned CapturingScopeIndex);
5395 
5397  void CleanupVarDeclMarking();
5398 
5401  };
5402 
5403  /// Try to capture the given variable.
5404  ///
5405  /// \param Var The variable to capture.
5406  ///
5407  /// \param Loc The location at which the capture occurs.
5408  ///
5409  /// \param Kind The kind of capture, which may be implicit (for either a
5410  /// block or a lambda), or explicit by-value or by-reference (for a lambda).
5411  ///
5412  /// \param EllipsisLoc The location of the ellipsis, if one is provided in
5413  /// an explicit lambda capture.
5414  ///
5415  /// \param BuildAndDiagnose Whether we are actually supposed to add the
5416  /// captures or diagnose errors. If false, this routine merely check whether
5417  /// the capture can occur without performing the capture itself or complaining
5418  /// if the variable cannot be captured.
5419  ///
5420  /// \param CaptureType Will be set to the type of the field used to capture
5421  /// this variable in the innermost block or lambda. Only valid when the
5422  /// variable can be captured.
5423  ///
5424  /// \param DeclRefType Will be set to the type of a reference to the capture
5425  /// from within the current scope. Only valid when the variable can be
5426  /// captured.
5427  ///
5428  /// \param FunctionScopeIndexToStopAt If non-null, it points to the index
5429  /// of the FunctionScopeInfo stack beyond which we do not attempt to capture.
5430  /// This is useful when enclosing lambdas must speculatively capture
5431  /// variables that may or may not be used in certain specializations of
5432  /// a nested generic lambda.
5433  ///
5434  /// \returns true if an error occurred (i.e., the variable cannot be
5435  /// captured) and false if the capture succeeded.
5437  SourceLocation EllipsisLoc, bool BuildAndDiagnose,
5438  QualType &CaptureType,
5439  QualType &DeclRefType,
5440  const unsigned *const FunctionScopeIndexToStopAt);
5441 
5442  /// Try to capture the given variable.
5443  bool tryCaptureVariable(VarDecl *Var, SourceLocation Loc,
5445  SourceLocation EllipsisLoc = SourceLocation());
5446 
5447  /// Checks if the variable must be captured.
5449 
5450  /// Given a variable, determine the type that a reference to that
5451  /// variable will have in the given scope.
5453 
5454  /// Mark all of the declarations referenced within a particular AST node as
5455  /// referenced. Used when template instantiation instantiates a non-dependent
5456  /// type -- entities referenced by the type are now referenced.
5459  bool SkipLocalVariables = false,
5460  ArrayRef<const Expr *> StopAt = None);
5461 
5462  /// Try to recover by turning the given expression into a
5463  /// call. Returns true if recovery was attempted or an error was
5464  /// emitted; this may also leave the ExprResult invalid.
5466  bool ForceComplain = false,
5467  bool (*IsPlausibleResult)(QualType) = nullptr);
5468 
5469  /// Figure out if an expression could be turned into a call.
5470  bool tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy,
5471  UnresolvedSetImpl &NonTemplateOverloads);
5472 
5473  /// Try to convert an expression \p E to type \p Ty. Returns the result of the
5474  /// conversion.
5476 
5477  /// Conditionally issue a diagnostic based on the statements's reachability
5478  /// analysis.
5479  ///
5480  /// \param Stmts If Stmts is non-empty, delay reporting the diagnostic until
5481  /// the function body is parsed, and then do a basic reachability analysis to
5482  /// determine if the statement is reachable. If it is unreachable, the
5483  /// diagnostic will not be emitted.
5485  const PartialDiagnostic &PD);
5486 
5487  /// Conditionally issue a diagnostic based on the current
5488  /// evaluation context.
5489  ///
5490  /// \param Statement If Statement is non-null, delay reporting the
5491  /// diagnostic until the function body is parsed, and then do a basic
5492  /// reachability analysis to determine if the statement is reachable.
5493  /// If it is unreachable, the diagnostic will not be emitted.
5494  bool DiagRuntimeBehavior(SourceLocation Loc, const Stmt *Statement,
5495  const PartialDiagnostic &PD);
5496  /// Similar, but diagnostic is only produced if all the specified statements
5497  /// are reachable.
5499  const PartialDiagnostic &PD);
5500 
5501  // Primary Expressions.
5502  SourceRange getExprRange(Expr *E) const;
5503 
5505  Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
5506  UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand,
5507  CorrectionCandidateCallback *CCC = nullptr,
5508  bool IsInlineAsmIdentifier = false, Token *KeywordReplacement = nullptr);
5509 
5511  TemplateArgumentListInfo &Buffer,
5512  DeclarationNameInfo &NameInfo,
5513  const TemplateArgumentListInfo *&TemplateArgs);
5514 
5516 
5517  bool
5520  TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr,
5521  ArrayRef<Expr *> Args = None, TypoExpr **Out = nullptr);
5522 
5524  IdentifierInfo *II);
5526 
5528  IdentifierInfo *II,
5529  bool AllowBuiltinCreation=false);
5530 
5532  SourceLocation TemplateKWLoc,
5533  const DeclarationNameInfo &NameInfo,
5534  bool isAddressOfOperand,
5535  const TemplateArgumentListInfo *TemplateArgs);
5536 
5537  /// If \p D cannot be odr-used in the current expression evaluation context,
5538  /// return a reason explaining why. Otherwise, return NOUR_None.
5540 
5542  SourceLocation Loc,
5543  const CXXScopeSpec *SS = nullptr);
5544  DeclRefExpr *
5546  const DeclarationNameInfo &NameInfo,
5547  const CXXScopeSpec *SS = nullptr,
5548  NamedDecl *FoundD = nullptr,
5549  SourceLocation TemplateKWLoc = SourceLocation(),
5550  const TemplateArgumentListInfo *TemplateArgs = nullptr);
5551  DeclRefExpr *
5553  const DeclarationNameInfo &NameInfo,
5555  NamedDecl *FoundD = nullptr,
5556  SourceLocation TemplateKWLoc = SourceLocation(),
5557  const TemplateArgumentListInfo *TemplateArgs = nullptr);
5558 
5559  ExprResult
5561  const CXXScopeSpec &SS,
5562  SourceLocation nameLoc,
5563  IndirectFieldDecl *indirectField,
5564  DeclAccessPair FoundDecl = DeclAccessPair::make(nullptr, AS_none),
5565  Expr *baseObjectExpr = nullptr,
5566  SourceLocation opLoc = SourceLocation());
5567 
5569  const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R,
5570  const TemplateArgumentListInfo *TemplateArgs, const Scope *S,
5571  UnresolvedLookupExpr *AsULE = nullptr);
5573  SourceLocation TemplateKWLoc,
5574  LookupResult &R,
5575  const TemplateArgumentListInfo *TemplateArgs,
5576  bool IsDefiniteInstance,
5577  const Scope *S);
5579  const LookupResult &R,
5580  bool HasTrailingLParen);
5581 
5582  ExprResult
5584  const DeclarationNameInfo &NameInfo,
5585  bool IsAddressOfOperand, const Scope *S,
5586  TypeSourceInfo **RecoveryTSI = nullptr);
5587 
5589  SourceLocation TemplateKWLoc,
5590  const DeclarationNameInfo &NameInfo,
5591  const TemplateArgumentListInfo *TemplateArgs);
5592 
5594  LookupResult &R,
5595  bool NeedsADL,
5596  bool AcceptInvalidDecl = false);
5598  const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, NamedDecl *D,
5599  NamedDecl *FoundD = nullptr,
5600  const TemplateArgumentListInfo *TemplateArgs = nullptr,
5601  bool AcceptInvalidDecl = false);
5602 
5604  DeclarationNameInfo &SuffixInfo,
5605  ArrayRef<Expr *> Args,
5606  SourceLocation LitEndLoc,
5607  TemplateArgumentListInfo *ExplicitTemplateArgs = nullptr);
5608 
5612  ExprResult ActOnIntegerConstant(SourceLocation Loc, uint64_t Val);
5613 
5615  SourceLocation LParen,
5616  SourceLocation RParen,
5617  TypeSourceInfo *TSI);
5619  SourceLocation LParen,
5620  SourceLocation RParen,
5621  ParsedType ParsedTy);
5622 
5624  SourceLocation LParen,
5625  SourceLocation RParen, Expr *E);
5627  SourceLocation LParen,
5628  SourceLocation RParen, Expr *E);
5629 
5630  bool CheckLoopHintExpr(Expr *E, SourceLocation Loc);
5631 
5632  ExprResult ActOnNumericConstant(const Token &Tok, Scope *UDLScope = nullptr);
5634  Scope *UDLScope = nullptr);
5637  SourceLocation R,
5638  MultiExprArg Val);
5639 
5640  /// ActOnStringLiteral - The specified tokens were lexed as pasted string
5641  /// fragments (e.g. "foo" "bar" L"baz").
5643  Scope *UDLScope = nullptr);
5644 
5646  SourceLocation DefaultLoc,
5647  SourceLocation RParenLoc,
5648  Expr *ControllingExpr,
5649  ArrayRef<ParsedType> ArgTypes,
5650  ArrayRef<Expr *> ArgExprs);
5652  SourceLocation DefaultLoc,
5653  SourceLocation RParenLoc,
5654  Expr *ControllingExpr,
5656  ArrayRef<Expr *> Exprs);
5657 
5658  // Binary/Unary Operators. 'Tok' is the token for the operator.
5660  Expr *InputExpr);
5662  UnaryOperatorKind Opc, Expr *Input);
5664  tok::TokenKind Op, Expr *Input);
5665 
5666  bool isQualifiedMemberAccess(Expr *E);
5668 
5670  SourceLocation OpLoc,
5671  UnaryExprOrTypeTrait ExprKind,
5672  SourceRange R);
5674  UnaryExprOrTypeTrait ExprKind);
5675  ExprResult
5677  UnaryExprOrTypeTrait ExprKind,
5678  bool IsType, void *TyOrEx,
5679  SourceRange ArgRange);
5680 
5682  bool CheckVecStepExpr(Expr *E);
5683 
5686  SourceRange ExprRange,
5687  UnaryExprOrTypeTrait ExprKind);
5689  SourceLocation OpLoc,
5690  IdentifierInfo &Name,
5691  SourceLocation NameLoc,
5692  SourceLocation RParenLoc);
5694  tok::TokenKind Kind, Expr *Input);
5695 
5697  MultiExprArg ArgExprs,
5698  SourceLocation RLoc);
5700  Expr *Idx, SourceLocation RLoc);
5701 
5703  Expr *ColumnIdx,
5704  SourceLocation RBLoc);
5705 
5707  Expr *LowerBound,
5708  SourceLocation ColonLocFirst,
5709  SourceLocation ColonLocSecond,
5710  Expr *Length, Expr *Stride,
5711  SourceLocation RBLoc);
5713  SourceLocation RParenLoc,
5714  ArrayRef<Expr *> Dims,
5715  ArrayRef<SourceRange> Brackets);
5716 
5717  /// Data structure for iterator expression.
5726  };
5727 
5729  SourceLocation LLoc, SourceLocation RLoc,
5731 
5732  // This struct is for use by ActOnMemberAccess to allow
5733  // BuildMemberReferenceExpr to be able to reinvoke ActOnMemberAccess after
5734  // changing the access operator from a '.' to a '->' (to see if that is the
5735  // change needed to fix an error about an unknown member, e.g. when the class
5736  // defines a custom operator->).
5741  };
5742 
5744  Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow,
5745  CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
5746  NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo,
5747  const TemplateArgumentListInfo *TemplateArgs,
5748  const Scope *S,
5749  ActOnMemberAccessExtraArgs *ExtraArgs = nullptr);
5750 
5751  ExprResult
5753  bool IsArrow, const CXXScopeSpec &SS,
5754  SourceLocation TemplateKWLoc,
5755  NamedDecl *FirstQualifierInScope, LookupResult &R,
5756  const TemplateArgumentListInfo *TemplateArgs,
5757  const Scope *S,
5758  bool SuppressQualifierCheck = false,
5759  ActOnMemberAccessExtraArgs *ExtraArgs = nullptr);
5760 
5761  ExprResult BuildFieldReferenceExpr(Expr *BaseExpr, bool IsArrow,
5762  SourceLocation OpLoc,
5763  const CXXScopeSpec &SS, FieldDecl *Field,
5764  DeclAccessPair FoundDecl,
5765  const DeclarationNameInfo &MemberNameInfo);
5766 
5768 
5769  bool CheckQualifiedMemberReference(Expr *BaseExpr, QualType BaseType,
5770  const CXXScopeSpec &SS,
5771  const LookupResult &R);
5772 
5774  bool IsArrow, SourceLocation OpLoc,
5775  const CXXScopeSpec &SS,
5776  SourceLocation TemplateKWLoc,
5777  NamedDecl *FirstQualifierInScope,
5778  const DeclarationNameInfo &NameInfo,
5779  const TemplateArgumentListInfo *TemplateArgs);
5780 
5782  SourceLocation OpLoc,
5783  tok::TokenKind OpKind,
5784  CXXScopeSpec &SS,
5785  SourceLocation TemplateKWLoc,
5786  UnqualifiedId &Member,
5787  Decl *ObjCImpDecl);
5788 
5789  MemberExpr *
5790  BuildMemberExpr(Expr *Base, bool IsArrow, SourceLocation OpLoc,
5791  const CXXScopeSpec *SS, SourceLocation TemplateKWLoc,
5792  ValueDecl *Member, DeclAccessPair FoundDecl,
5793  bool HadMultipleCandidates,
5794  const DeclarationNameInfo &MemberNameInfo, QualType Ty,
5796  const TemplateArgumentListInfo *TemplateArgs = nullptr);
5797  MemberExpr *
5798  BuildMemberExpr(Expr *Base, bool IsArrow, SourceLocation OpLoc,
5799  NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc,
5800  ValueDecl *Member, DeclAccessPair FoundDecl,
5801  bool HadMultipleCandidates,
5802  const DeclarationNameInfo &MemberNameInfo, QualType Ty,
5804  const TemplateArgumentListInfo *TemplateArgs = nullptr);
5805 
5806  void ActOnDefaultCtorInitializers(Decl *CDtorDecl);
5807  bool ConvertArgumentsForCall(CallExpr *Call, Expr *Fn,
5808  FunctionDecl *FDecl,
5809  const FunctionProtoType *Proto,
5810  ArrayRef<Expr *> Args,
5811  SourceLocation RParenLoc,
5812  bool ExecConfig = false);
5814  ParmVarDecl *Param,
5815  const Expr *ArgExpr);
5816 
5817  /// ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
5818  /// This provides the location of the left/right parens and a list of comma
5819  /// locations.
5820  ExprResult ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc,
5821  MultiExprArg ArgExprs, SourceLocation RParenLoc,
5822  Expr *ExecConfig = nullptr);
5823  ExprResult BuildCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc,
5824  MultiExprArg ArgExprs, SourceLocation RParenLoc,
5825  Expr *ExecConfig = nullptr,
5826  bool IsExecConfig = false,
5827  bool AllowRecovery = false);
5829  MultiExprArg CallArgs);
5830  enum class AtomicArgumentOrder { API, AST };
5831  ExprResult
5832  BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange,
5833  SourceLocation RParenLoc, MultiExprArg Args,
5836  ExprResult
5837  BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc,
5838  ArrayRef<Expr *> Arg, SourceLocation RParenLoc,
5839  Expr *Config = nullptr, bool IsExecConfig = false,
5840  ADLCallKind UsesADL = ADLCallKind::NotADL);
5841 
5843  MultiExprArg ExecConfig,
5844  SourceLocation GGGLoc);
5845 
5847  Declarator &D, ParsedType &Ty,
5848  SourceLocation RParenLoc, Expr *CastExpr);
5850  TypeSourceInfo *Ty,
5851  SourceLocation RParenLoc,
5852  Expr *Op);
5854 
5855  /// Build an altivec or OpenCL literal.
5857  SourceLocation RParenLoc, Expr *E,
5858  TypeSourceInfo *TInfo);
5859 
5861 
5863  ParsedType Ty,
5864  SourceLocation RParenLoc,
5865  Expr *InitExpr);
5866 
5868  TypeSourceInfo *TInfo,
5869  SourceLocation RParenLoc,
5870  Expr *LiteralExpr);
5871 
5873  MultiExprArg InitArgList,
5874  SourceLocation RBraceLoc);
5875 
5877  MultiExprArg InitArgList,
5878  SourceLocation RBraceLoc);
5879 
5881  SourceLocation EqualOrColonLoc,
5882  bool GNUSyntax,
5883  ExprResult Init);
5884 
5885 private:
5886  static BinaryOperatorKind ConvertTokenKindToBinaryOpcode(tok::TokenKind Kind);
5887 
5888 public:
5890  tok::TokenKind Kind, Expr *LHSExpr, Expr *RHSExpr);
5892  BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr);
5894  Expr *LHSExpr, Expr *RHSExpr);
5895  void LookupBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc,
5896  UnresolvedSetImpl &Functions);
5897 
5898  void DiagnoseCommaOperator(const Expr *LHS, SourceLocation Loc);
5899 
5900  /// ActOnConditionalOp - Parse a ?: operation. Note that 'LHS' may be null
5901  /// in the case of a the GNU conditional expr extension.
5903  SourceLocation ColonLoc,
5904  Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr);
5905 
5906  /// ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
5908  LabelDecl *TheDecl);
5909 
5910  void ActOnStartStmtExpr();
5911  ExprResult ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt,
5912  SourceLocation RPLoc);
5913  ExprResult BuildStmtExpr(SourceLocation LPLoc, Stmt *SubStmt,
5914  SourceLocation RPLoc, unsigned TemplateDepth);
5915  // Handle the final expression in a statement expression.
5917  void ActOnStmtExprError();
5918 
5919  // __builtin_offsetof(type, identifier(.identifier|[expr])*)
5922  bool isBrackets; // true if [expr], false if .ident
5923  union {
5926  } U;
5927  };
5928 
5929  /// __builtin_offsetof(type, a.b[123][456].c)
5931  TypeSourceInfo *TInfo,
5932  ArrayRef<OffsetOfComponent> Components,
5933  SourceLocation RParenLoc);
5935  SourceLocation BuiltinLoc,
5937  ParsedType ParsedArgTy,
5938  ArrayRef<OffsetOfComponent> Components,
5939  SourceLocation RParenLoc);
5940 
5941  // __builtin_choose_expr(constExpr, expr1, expr2)
5943  Expr *CondExpr, Expr *LHSExpr,
5944  Expr *RHSExpr, SourceLocation RPLoc);
5945 
5946  // __builtin_va_arg(expr, type)
5947  ExprResult ActOnVAArg(SourceLocation BuiltinLoc, Expr *E, ParsedType Ty,
5948  SourceLocation RPLoc);
5950  TypeSourceInfo *TInfo, SourceLocation RPLoc);
5951 
5952  // __builtin_LINE(), __builtin_FUNCTION(), __builtin_FILE(),
5953  // __builtin_COLUMN()
5955  SourceLocation BuiltinLoc,
5956  SourceLocation RPLoc);
5957 
5958  // Build a potentially resolved SourceLocExpr.
5960  SourceLocation BuiltinLoc, SourceLocation RPLoc,
5961  DeclContext *ParentContext);
5962 
5963  // __null
5965 
5966  bool CheckCaseExpression(Expr *E);
5967 
5968  /// Describes the result of an "if-exists" condition check.
5970  /// The symbol exists.
5972 
5973  /// The symbol does not exist.
5975 
5976  /// The name is a dependent name, so the results will differ
5977  /// from one instantiation to the next.
5979 
5980  /// An error occurred.
5982  };
5983 
5986  const DeclarationNameInfo &TargetNameInfo);
5987 
5990  bool IsIfExists, CXXScopeSpec &SS,
5991  UnqualifiedId &Name);
5992 
5994  bool IsIfExists,
5995  NestedNameSpecifierLoc QualifierLoc,
5996  DeclarationNameInfo NameInfo,
5997  Stmt *Nested);
5999  bool IsIfExists,
6000  CXXScopeSpec &SS, UnqualifiedId &Name,
6001  Stmt *Nested);
6002 
6003  //===------------------------- "Block" Extension ------------------------===//
6004 
6005  /// ActOnBlockStart - This callback is invoked when a block literal is
6006  /// started.
6007  void ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope);
6008 
6009  /// ActOnBlockArguments - This callback allows processing of block arguments.
6010  /// If there are no arguments, this is still invoked.
6011  void ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo,
6012  Scope *CurScope);
6013 
6014  /// ActOnBlockError - If there is an error parsing a block, this callback
6015  /// is invoked to pop the information about the block from the action impl.
6016  void ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope);
6017 
6018  /// ActOnBlockStmtExpr - This is called when the body of a block statement
6019  /// literal was successfully completed. ^(int x){...}
6021  Scope *CurScope);
6022 
6023  //===---------------------------- Clang Extensions ----------------------===//
6024 
6025  /// __builtin_convertvector(...)
6027  SourceLocation BuiltinLoc,
6028  SourceLocation RParenLoc);
6029 
6030  //===---------------------------- OpenCL Features -----------------------===//
6031 
6032  /// __builtin_astype(...)
6033  ExprResult ActOnAsTypeExpr(Expr *E, ParsedType ParsedDestTy,
6034  SourceLocation BuiltinLoc,
6035  SourceLocation RParenLoc);
6037  SourceLocation BuiltinLoc,
6038  SourceLocation RParenLoc);
6039 
6040  //===---------------------------- C++ Features --------------------------===//
6041 
6042  // Act on C++ namespaces
6044  SourceLocation NamespaceLoc,
6045  SourceLocation IdentLoc, IdentifierInfo *Ident,
6046  SourceLocation LBrace,
6047  const ParsedAttributesView &AttrList,
6049  void ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace);
6050 
6051  NamespaceDecl *getStdNamespace() const;
6053 
6056 
6057  CXXRecordDecl *getStdBadAlloc() const;
6058  EnumDecl *getStdAlignValT() const;
6059 
6060 private:
6061  // A cache representing if we've fully checked the various comparison category
6062  // types stored in ASTContext. The bit-index corresponds to the integer value
6063  // of a ComparisonCategoryType enumerator.
6064  llvm::SmallBitVector FullyCheckedComparisonCategories;
6065 
6066  ValueDecl *tryLookupCtorInitMemberDecl(CXXRecordDecl *ClassDecl,
6067  CXXScopeSpec &SS,
6068  ParsedType TemplateTypeTy,
6069  IdentifierInfo *MemberOrBase);
6070 
6071 public:
6073  /// The '<=>' operator was used in an expression and a builtin operator
6074  /// was selected.
6076  /// A defaulted 'operator<=>' needed the comparison category. This
6077  /// typically only applies to 'std::strong_ordering', due to the implicit
6078  /// fallback return value.
6080  };
6081 
6082  /// Lookup the specified comparison category types in the standard
6083  /// library, an check the VarDecls possibly returned by the operator<=>
6084  /// builtins for that type.
6085  ///
6086  /// \return The type of the comparison category type corresponding to the
6087  /// specified Kind, or a null type if an error occurs
6089  SourceLocation Loc,
6090  ComparisonCategoryUsage Usage);
6091 
6092  /// Tests whether Ty is an instance of std::initializer_list and, if
6093  /// it is and Element is not NULL, assigns the element type to Element.
6094  bool isStdInitializerList(QualType Ty, QualType *Element);
6095 
6096  /// Looks for the std::initializer_list template and instantiates it
6097  /// with Element, or emits an error if it's not found.
6098  ///
6099  /// \returns The instantiated template, or null on error.
6101 
6102  /// Determine whether Ctor is an initializer-list constructor, as
6103  /// defined in [dcl.init.list]p2.
6104  bool isInitListConstructor(const FunctionDecl *Ctor);
6105 
6106  Decl *ActOnUsingDirective(Scope *CurScope, SourceLocation UsingLoc,
6107  SourceLocation NamespcLoc, CXXScopeSpec &SS,
6108  SourceLocation IdentLoc,
6109  IdentifierInfo *NamespcName,
6110  const ParsedAttributesView &AttrList);
6111 
6113 
6114  Decl *ActOnNamespaceAliasDef(Scope *CurScope,
6115  SourceLocation NamespaceLoc,
6116  SourceLocation AliasLoc,
6117  IdentifierInfo *Alias,
6118  CXXScopeSpec &SS,
6119  SourceLocation IdentLoc,
6120  IdentifierInfo *Ident);
6121 
6122  void FilterUsingLookup(Scope *S, LookupResult &lookup);
6123  void HideUsingShadowDecl(Scope *S, UsingShadowDecl *Shadow);
6124  bool CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Target,
6125  const LookupResult &PreviousDecls,
6126  UsingShadowDecl *&PrevShadow);
6128  NamedDecl *Target,
6129  UsingShadowDecl *PrevDecl);
6130 
6132  bool HasTypenameKeyword,
6133  const CXXScopeSpec &SS,
6134  SourceLocation NameLoc,
6135  const LookupResult &Previous);
6136  bool CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename,
6137  const CXXScopeSpec &SS,
6138  const DeclarationNameInfo &NameInfo,
6139  SourceLocation NameLoc,
6140  const LookupResult *R = nullptr,
6141  const UsingDecl *UD = nullptr);
6142 
6144  Scope *S, AccessSpecifier AS, SourceLocation UsingLoc,
6145  bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS,
6146  DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc,
6147  const ParsedAttributesView &AttrList, bool IsInstantiation,
6148  bool IsUsingIfExists);
6150  SourceLocation UsingLoc,
6151  SourceLocation EnumLoc,
6152  SourceLocation NameLoc, EnumDecl *ED);
6153  NamedDecl *BuildUsingPackDecl(NamedDecl *InstantiatedFrom,
6154  ArrayRef<NamedDecl *> Expansions);
6155 
6157 
6158  /// Given a derived-class using shadow declaration for a constructor and the
6159  /// correspnding base class constructor, find or create the implicit
6160  /// synthesized derived class constructor to use for this initialization.
6163  ConstructorUsingShadowDecl *DerivedShadow);
6164 
6166  SourceLocation UsingLoc,
6167  SourceLocation TypenameLoc, CXXScopeSpec &SS,
6168  UnqualifiedId &Name, SourceLocation EllipsisLoc,
6169  const ParsedAttributesView &AttrList);
6171  SourceLocation UsingLoc,
6172  SourceLocation EnumLoc, const DeclSpec &);
6174  MultiTemplateParamsArg TemplateParams,
6175  SourceLocation UsingLoc, UnqualifiedId &Name,
6176  const ParsedAttributesView &AttrList,
6177  TypeResult Type, Decl *DeclFromDeclSpec);
6178 
6179  /// BuildCXXConstructExpr - Creates a complete call to a constructor,
6180  /// including handling of its default argument expressions.
6181  ///
6182  /// \param ConstructKind - a CXXConstructExpr::ConstructionKind
6183  ExprResult
6184  BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
6185  NamedDecl *FoundDecl,
6186  CXXConstructorDecl *Constructor, MultiExprArg Exprs,
6187  bool HadMultipleCandidates, bool IsListInitialization,
6188  bool IsStdInitListInitialization,
6189  bool RequiresZeroInit, unsigned ConstructKind,
6190  SourceRange ParenRange);
6191 
6192  /// Build a CXXConstructExpr whose constructor has already been resolved if
6193  /// it denotes an inherited constructor.
6194  ExprResult
6195  BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
6196  CXXConstructorDecl *Constructor, bool Elidable,
6197  MultiExprArg Exprs,
6198  bool HadMultipleCandidates, bool IsListInitialization,
6199  bool IsStdInitListInitialization,
6200  bool RequiresZeroInit, unsigned ConstructKind,
6201  SourceRange ParenRange);
6202 
6203  // FIXME: Can we remove this and have the above BuildCXXConstructExpr check if
6204  // the constructor can be elidable?
6205  ExprResult
6206  BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType,
6207  NamedDecl *FoundDecl,
6208  CXXConstructorDecl *Constructor, bool Elidable,
6209  MultiExprArg Exprs, bool HadMultipleCandidates,
6210  bool IsListInitialization,
6211  bool IsStdInitListInitialization, bool RequiresZeroInit,
6212  unsigned ConstructKind, SourceRange ParenRange);
6213 
6215 
6216 
6217  /// Instantiate or parse a C++ default argument expression as necessary.
6218  /// Return true on error.
6220  ParmVarDecl *Param);
6221 
6222  /// BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating
6223  /// the default expr if needed.
6225  FunctionDecl *FD,
6226  ParmVarDecl *Param);
6227 
6228  /// FinalizeVarWithDestructor - Prepare for calling destructor on the
6229  /// constructed variable.
6230  void FinalizeVarWithDestructor(VarDecl *VD, const RecordType *DeclInitType);
6231 
6232  /// Helper class that collects exception specifications for
6233  /// implicitly-declared special member functions.
6235  // Pointer to allow copying
6236  Sema *Self;
6237  // We order exception specifications thus:
6238  // noexcept is the most restrictive, but is only used in C++11.
6239  // throw() comes next.
6240  // Then a throw(collected exceptions)
6241  // Finally no specification, which is expressed as noexcept(false).
6242  // throw(...) is used instead if any called function uses it.
6243  ExceptionSpecificationType ComputedEST;
6244  llvm::SmallPtrSet<CanQualType, 4> ExceptionsSeen;
6245  SmallVector<QualType, 4> Exceptions;
6246 
6247  void ClearExceptions() {
6248  ExceptionsSeen.clear();
6249  Exceptions.clear();
6250  }
6251 
6252  public:
6254  : Self(&Self), ComputedEST(EST_BasicNoexcept) {
6255  if (!Self.getLangOpts().CPlusPlus11)
6256  ComputedEST = EST_DynamicNone;
6257  }
6258 
6259  /// Get the computed exception specification type.
6261  assert(!isComputedNoexcept(ComputedEST) &&
6262  "noexcept(expr) should not be a possible result");
6263  return ComputedEST;
6264  }
6265 
6266  /// The number of exceptions in the exception specification.
6267  unsigned size() const { return Exceptions.size(); }
6268 
6269  /// The set of exceptions in the exception specification.
6270  const QualType *data() const { return Exceptions.data(); }
6271 
6272  /// Integrate another called method into the collected data.
6273  void CalledDecl(SourceLocation CallLoc, const CXXMethodDecl *Method);
6274 
6275  /// Integrate an invoked expression into the collected data.
6276  void CalledExpr(Expr *E) { CalledStmt(E); }
6277 
6278  /// Integrate an invoked statement into the collected data.
6279  void CalledStmt(Stmt *S);
6280 
6281  /// Overwrite an EPI's exception specification with this
6282  /// computed exception specification.
6285  ESI.Type = getExceptionSpecType();
6286  if (ESI.Type == EST_Dynamic) {
6287  ESI.Exceptions = Exceptions;
6288  } else if (ESI.Type == EST_None) {
6289  /// C++11 [except.spec]p14:
6290  /// The exception-specification is noexcept(false) if the set of
6291  /// potential exceptions of the special member function contains "any"
6292  ESI.Type = EST_NoexceptFalse;
6294  tok::kw_false).get();
6295  }
6296  return ESI;
6297  }
6298  };
6299 
6300  /// Evaluate the implicit exception specification for a defaulted
6301  /// special member function.
6303 
6304  /// Check the given noexcept-specifier, convert its expression, and compute
6305  /// the appropriate ExceptionSpecificationType.
6306  ExprResult ActOnNoexceptSpec(Expr *NoexceptExpr,
6308 
6309  /// Check the given exception-specification and update the
6310  /// exception specification information with the results.
6311  void checkExceptionSpecification(bool IsTopLevel,
6313  ArrayRef<ParsedType> DynamicExceptions,
6314  ArrayRef<SourceRange> DynamicExceptionRanges,
6315  Expr *NoexceptExpr,
6316  SmallVectorImpl<QualType> &Exceptions,
6318 
6319  /// Determine if we're in a case where we need to (incorrectly) eagerly
6320  /// parse an exception specification to work around a libstdc++ bug.
6322 
6323  /// Add an exception-specification to the given member function
6324  /// (or member function template). The exception-specification was parsed
6325  /// after the method itself was declared.
6328  SourceRange SpecificationRange,
6329  ArrayRef<ParsedType> DynamicExceptions,
6330  ArrayRef<SourceRange> DynamicExceptionRanges,
6331  Expr *NoexceptExpr);
6332 
6333  class InheritedConstructorInfo;
6334 
6335  /// Determine if a special member function should have a deleted
6336  /// definition when it is defaulted.
6338  InheritedConstructorInfo *ICI = nullptr,
6339  bool Diagnose = false);
6340 
6341  /// Produce notes explaining why a defaulted function was defined as deleted.
6343 
6344  /// Declare the implicit default constructor for the given class.
6345  ///
6346  /// \param ClassDecl The class declaration into which the implicit
6347  /// default constructor will be added.
6348  ///
6349  /// \returns The implicitly-declared default constructor.
6351  CXXRecordDecl *ClassDecl);
6352 
6353  /// DefineImplicitDefaultConstructor - Checks for feasibility of
6354  /// defining this constructor as the default constructor.
6355  void DefineImplicitDefaultConstructor(SourceLocation CurrentLocation,
6356  CXXConstructorDecl *Constructor);
6357 
6358  /// Declare the implicit destructor for the given class.
6359  ///
6360  /// \param ClassDecl The class declaration into which the implicit
6361  /// destructor will be added.
6362  ///
6363  /// \returns The implicitly-declared destructor.
6365 
6366  /// DefineImplicitDestructor - Checks for feasibility of
6367  /// defining this destructor as the default destructor.
6368  void DefineImplicitDestructor(SourceLocation CurrentLocation,
6369  CXXDestructorDecl *Destructor);
6370 
6371  /// Build an exception spec for destructors that don't have one.
6372  ///
6373  /// C++11 says that user-defined destructors with no exception spec get one
6374  /// that looks as if the destructor was implicitly declared.
6376 
6377  /// Define the specified inheriting constructor.
6379  CXXConstructorDecl *Constructor);
6380 
6381  /// Declare the implicit copy constructor for the given class.
6382  ///
6383  /// \param ClassDecl The class declaration into which the implicit
6384  /// copy constructor will be added.
6385  ///
6386  /// \returns The implicitly-declared copy constructor.
6388 
6389  /// DefineImplicitCopyConstructor - Checks for feasibility of
6390  /// defining this constructor as the copy constructor.
6391  void DefineImplicitCopyConstructor(SourceLocation CurrentLocation,
6392  CXXConstructorDecl *Constructor);
6393 
6394  /// Declare the implicit move constructor for the given class.
6395  ///
6396  /// \param ClassDecl The Class declaration into which the implicit
6397  /// move constructor will be added.
6398  ///
6399  /// \returns The implicitly-declared move constructor, or NULL if it wasn't
6400  /// declared.
6402 
6403  /// DefineImplicitMoveConstructor - Checks for feasibility of
6404  /// defining this constructor as the move constructor.
6405  void DefineImplicitMoveConstructor(SourceLocation CurrentLocation,
6406  CXXConstructorDecl *Constructor);
6407 
6408  /// Declare the implicit copy assignment operator for the given class.
6409  ///
6410  /// \param ClassDecl The class declaration into which the implicit
6411  /// copy assignment operator will be added.
6412  ///
6413  /// \returns The implicitly-declared copy assignment operator.
6415 
6416  /// Defines an implicitly-declared copy assignment operator.
6417  void DefineImplicitCopyAssignment(SourceLocation CurrentLocation,
6418  CXXMethodDecl *MethodDecl);
6419 
6420  /// Declare the implicit move assignment operator for the given class.
6421  ///
6422  /// \param ClassDecl The Class declaration into which the implicit
6423  /// move assignment operator will be added.
6424  ///
6425  /// \returns The implicitly-declared move assignment operator, or NULL if it
6426  /// wasn't declared.
6428 
6429  /// Defines an implicitly-declared move assignment operator.
6430  void DefineImplicitMoveAssignment(SourceLocation CurrentLocation,
6431  CXXMethodDecl *MethodDecl);
6432 
6433  /// Force the declaration of any implicitly-declared members of this
6434  /// class.
6436 
6437  /// Check a completed declaration of an implicit special member.
6439 
6440  /// Determine whether the given function is an implicitly-deleted
6441  /// special member function.
6443 
6444  /// Check whether 'this' shows up in the type of a static member
6445  /// function after the (naturally empty) cv-qualifier-seq would be.
6446  ///
6447  /// \returns true if an error occurred.
6449 
6450  /// Whether this' shows up in the exception specification of a static
6451  /// member function.
6453 
6454  /// Check whether 'this' shows up in the attributes of the given
6455  /// static member function.
6456  ///
6457  /// \returns true if an error occurred.
6459 
6460  /// MaybeBindToTemporary - If the passed in expression has a record type with
6461  /// a non-trivial destructor, this will return CXXBindTemporaryExpr. Otherwise
6462  /// it simply returns the passed in expression.
6464 
6465  /// Wrap the expression in a ConstantExpr if it is a potential immediate
6466  /// invocation.
6468 
6469  bool CompleteConstructorCall(CXXConstructorDecl *Constructor,
6470  QualType DeclInitType, MultiExprArg ArgsPtr,
6471  SourceLocation Loc,
6472  SmallVectorImpl<Expr *> &ConvertedArgs,
6473  bool AllowExplicit = false,
6474  bool IsListInitialization = false);
6475 
6477  SourceLocation NameLoc,
6478  IdentifierInfo &Name);
6479 
6481  Scope *S, CXXScopeSpec &SS,
6482  bool EnteringContext);
6484  IdentifierInfo &II, SourceLocation NameLoc,
6485  Scope *S, CXXScopeSpec &SS,
6486  ParsedType ObjectType,
6487  bool EnteringContext);
6488 
6490  ParsedType ObjectType);
6491 
6492  // Checks that reinterpret casts don't have undefined behavior.
6493  void CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType,
6494  bool IsDereference, SourceRange Range);
6495 
6496  // Checks that the vector type should be initialized from a scalar
6497  // by splatting the value rather than populating a single element.
6498  // This is the case for AltiVecVector types as well as with
6499  // AltiVecPixel and AltiVecBool when -faltivec-src-compat=xl is specified.
6500  bool ShouldSplatAltivecScalarInCast(const VectorType *VecTy);
6501 
6502  // Checks if the -faltivec-src-compat=gcc option is specified.
6503  // If so, AltiVecVector, AltiVecBool and AltiVecPixel types are
6504  // treated the same way as they are when trying to initialize
6505  // these vectors on gcc (an error is emitted).
6507  QualType SrcTy);
6508 
6509  /// ActOnCXXNamedCast - Parse
6510  /// {dynamic,static,reinterpret,const,addrspace}_cast's.
6513  SourceLocation LAngleBracketLoc,
6514  Declarator &D,
6515  SourceLocation RAngleBracketLoc,
6516  SourceLocation LParenLoc,
6517  Expr *E,
6518  SourceLocation RParenLoc);
6519 
6522  TypeSourceInfo *Ty,
6523  Expr *E,
6524  SourceRange AngleBrackets,
6525  SourceRange Parens);
6526 
6528  ExprResult Operand,
6529  SourceLocation RParenLoc);
6530 
6532  Expr *Operand, SourceLocation RParenLoc);
6533 
6534  ExprResult BuildCXXTypeId(QualType TypeInfoType,
6535  SourceLocation TypeidLoc,
6536  TypeSourceInfo *Operand,
6537  SourceLocation RParenLoc);
6538  ExprResult BuildCXXTypeId(QualType TypeInfoType,
6539  SourceLocation TypeidLoc,
6540  Expr *Operand,
6541  SourceLocation RParenLoc);
6542 
6543  /// ActOnCXXTypeid - Parse typeid( something ).
6545  SourceLocation LParenLoc, bool isType,
6546  void *TyOrExpr,
6547  SourceLocation RParenLoc);
6548 
6549  ExprResult BuildCXXUuidof(QualType TypeInfoType,
6550  SourceLocation TypeidLoc,
6551  TypeSourceInfo *Operand,
6552  SourceLocation RParenLoc);
6553  ExprResult BuildCXXUuidof(QualType TypeInfoType,
6554  SourceLocation TypeidLoc,
6555  Expr *Operand,
6556  SourceLocation RParenLoc);
6557 
6558  /// ActOnCXXUuidof - Parse __uuidof( something ).
6560  SourceLocation LParenLoc, bool isType,
6561  void *TyOrExpr,
6562  SourceLocation RParenLoc);
6563 
6564  /// Handle a C++1z fold-expression: ( expr op ... op expr ).
6565  ExprResult ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS,
6566  tok::TokenKind Operator,
6567  SourceLocation EllipsisLoc, Expr *RHS,
6568  SourceLocation RParenLoc);
6570  SourceLocation LParenLoc, Expr *LHS,
6571  BinaryOperatorKind Operator,
6572  SourceLocation EllipsisLoc, Expr *RHS,
6573  SourceLocation RParenLoc,
6574  Optional<unsigned> NumExpansions);
6576  BinaryOperatorKind Operator);
6577 
6578  //// ActOnCXXThis - Parse 'this' pointer.
6580 
6581  /// Build a CXXThisExpr and mark it referenced in the current context.
6582  Expr *BuildCXXThisExpr(SourceLocation Loc, QualType Type, bool IsImplicit);
6584 
6585  /// Try to retrieve the type of the 'this' pointer.
6586  ///
6587  /// \returns The type of 'this', if possible. Otherwise, returns a NULL type.
6589 
6590  /// When non-NULL, the C++ 'this' expression is allowed despite the
6591  /// current context not being a non-static member function. In such cases,
6592  /// this provides the type used for 'this'.
6594 
6595  /// RAII object used to temporarily allow the C++ 'this' expression
6596  /// to be used, with the given qualifiers on the current class type.
6598  Sema &S;
6599  QualType OldCXXThisTypeOverride;
6600  bool Enabled;
6601 
6602  public:
6603  /// Introduce a new scope where 'this' may be allowed (when enabled),
6604  /// using the given declaration (which is either a class template or a
6605  /// class) along with the given qualifiers.
6606  /// along with the qualifiers placed on '*this'.
6607  CXXThisScopeRAII(Sema &S, Decl *ContextDecl, Qualifiers CXXThisTypeQuals,
6608  bool Enabled = true);
6609 
6611  };
6612 
6613  /// Make sure the value of 'this' is actually available in the current
6614  /// context, if it is a potentially evaluated context.
6615  ///
6616  /// \param Loc The location at which the capture of 'this' occurs.
6617  ///
6618  /// \param Explicit Whether 'this' is explicitly captured in a lambda
6619  /// capture list.
6620  ///
6621  /// \param FunctionScopeIndexToStopAt If non-null, it points to the index
6622  /// of the FunctionScopeInfo stack beyond which we do not attempt to capture.
6623  /// This is useful when enclosing lambdas must speculatively capture
6624  /// 'this' that may or may not be used in certain specializations of
6625  /// a nested generic lambda (depending on whether the name resolves to
6626  /// a non-static member function or a static function).
6627  /// \return returns 'true' if failed, 'false' if success.
6628  bool CheckCXXThisCapture(SourceLocation Loc, bool Explicit = false,
6629  bool BuildAndDiagnose = true,
6630  const unsigned *const FunctionScopeIndexToStopAt = nullptr,
6631  bool ByCopy = false);
6632 
6633  /// Determine whether the given type is the type of *this that is used
6634  /// outside of the body of a member function for a type that is currently
6635  /// being defined.
6637 
6638  /// ActOnCXXBoolLiteral - Parse {true,false} literals.
6640 
6641 
6642  /// ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
6644 
6645  ExprResult
6647  SourceLocation AtLoc, SourceLocation RParen);
6648 
6649  /// ActOnCXXNullPtrLiteral - Parse 'nullptr'.
6651 
6652  //// ActOnCXXThrow - Parse throw expressions.
6655  bool IsThrownVarInScope);
6656  bool CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ThrowTy, Expr *E);
6657 
6658  /// ActOnCXXTypeConstructExpr - Parse construction of a specified type.
6659  /// Can be interpreted either as function-style casting ("int(x)")
6660  /// or class type construction ("ClassType(x,y,z)")
6661  /// or creation of a value-initialized type ("int()").
6663  SourceLocation LParenOrBraceLoc,
6664  MultiExprArg Exprs,
6665  SourceLocation RParenOrBraceLoc,
6666  bool ListInitialization);
6667 
6669  SourceLocation LParenLoc,
6670  MultiExprArg Exprs,
6671  SourceLocation RParenLoc,
6672  bool ListInitialization);
6673 
6674  /// ActOnCXXNew - Parsed a C++ 'new' expression.
6675  ExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal,
6676  SourceLocation PlacementLParen,
6677  MultiExprArg PlacementArgs,
6678  SourceLocation PlacementRParen,
6679  SourceRange TypeIdParens, Declarator &D,
6680  Expr *Initializer);
6681  ExprResult BuildCXXNew(SourceRange Range, bool UseGlobal,
6682  SourceLocation PlacementLParen,
6683  MultiExprArg PlacementArgs,
6684  SourceLocation PlacementRParen,
6685  SourceRange TypeIdParens,
6686  QualType AllocType,
6687  TypeSourceInfo *AllocTypeInfo,
6688  Optional<Expr *> ArraySize,
6689  SourceRange DirectInitRange,
6690  Expr *Initializer);
6691 
6692  /// Determine whether \p FD is an aligned allocation or deallocation
6693  /// function that is unavailable.
6695 
6696  /// Produce diagnostics if \p FD is an aligned allocation or deallocation
6697  /// function that is unavailable.
6699  SourceLocation Loc);
6700 
6701  bool CheckAllocatedType(QualType AllocType, SourceLocation Loc,
6702  SourceRange R);
6703 
6704  /// The scope in which to find allocation functions.
6706  /// Only look for allocation functions in the global scope.
6708  /// Only look for allocation functions in the scope of the
6709  /// allocated class.
6711  /// Look for allocation functions in both the global scope
6712  /// and in the scope of the allocated class.
6714  };
6715 
6716  /// Finds the overloads of operator new and delete that are appropriate
6717  /// for the allocation.
6718  bool FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range,
6719  AllocationFunctionScope NewScope,
6720  AllocationFunctionScope DeleteScope,
6721  QualType AllocType, bool IsArray,
6722  bool &PassAlignment, MultiExprArg PlaceArgs,
6723  FunctionDecl *&OperatorNew,
6724  FunctionDecl *&OperatorDelete,
6725  bool Diagnose = true);
6726  void DeclareGlobalNewDelete();
6728  ArrayRef<QualType> Params);
6729 
6731  DeclarationName Name, FunctionDecl* &Operator,
6732  bool Diagnose = true);
6734  bool CanProvideSize,
6735  bool Overaligned,
6736  DeclarationName Name);
6738  CXXRecordDecl *RD);
6739 
6740  /// ActOnCXXDelete - Parsed a C++ 'delete' expression
6742  bool UseGlobal, bool ArrayForm,
6743  Expr *Operand);
6745  bool IsDelete, bool CallCanBeVirtual,
6746  bool WarnOnNonAbstractTypes,
6747  SourceLocation DtorLoc);
6748 
6750  Expr *Operand, SourceLocation RParen);
6752  SourceLocation RParen);
6753 
6754  /// Parsed one of the type trait support pseudo-functions.
6756  ArrayRef<ParsedType> Args,
6757  SourceLocation RParenLoc);
6760  SourceLocation RParenLoc);
6761 
6762  /// ActOnArrayTypeTrait - Parsed one of the binary type trait support
6763  /// pseudo-functions.
6765  SourceLocation KWLoc,
6766  ParsedType LhsTy,
6767  Expr *DimExpr,
6768  SourceLocation RParen);
6769 
6771  SourceLocation KWLoc,
6772  TypeSourceInfo *TSInfo,
6773  Expr *DimExpr,
6774  SourceLocation RParen);
6775 
6776  /// ActOnExpressionTrait - Parsed one of the unary type trait support
6777  /// pseudo-functions.
6779  SourceLocation KWLoc,
6780  Expr *Queried,
6781  SourceLocation RParen);
6782 
6784  SourceLocation KWLoc,
6785  Expr *Queried,
6786  SourceLocation RParen);
6787 
6789  Expr *Base,
6790  SourceLocation OpLoc,
6791  tok::TokenKind OpKind,
6792  ParsedType &ObjectType,
6793  bool &MayBePseudoDestructor);
6794 
6796  SourceLocation OpLoc,
6797  tok::TokenKind OpKind,
6798  const CXXScopeSpec &SS,
6799  TypeSourceInfo *ScopeType,
6800  SourceLocation CCLoc,
6801  SourceLocation TildeLoc,
6802  PseudoDestructorTypeStorage DestroyedType);
6803 
6805  SourceLocation OpLoc,
6806  tok::TokenKind OpKind,
6807  CXXScopeSpec &SS,
6808  UnqualifiedId &FirstTypeName,
6809  SourceLocation CCLoc,
6810  SourceLocation TildeLoc,
6811  UnqualifiedId &SecondTypeName);
6812 
6814  SourceLocation OpLoc,
6815  tok::TokenKind OpKind,
6816  SourceLocation TildeLoc,
6817  const DeclSpec& DS);
6818 
6819  /// MaybeCreateExprWithCleanups - If the current full-expression
6820  /// requires any cleanups, surround it with a ExprWithCleanups node.
6821  /// Otherwise, just returns the passed-in expression.
6825 
6828  bool BoundToLvalueReference);
6829 
6830  ExprResult ActOnFinishFullExpr(Expr *Expr, bool DiscardedValue) {
6831  return ActOnFinishFullExpr(
6832  Expr, Expr ? Expr->getExprLoc() : SourceLocation(), DiscardedValue);
6833  }
6835  bool DiscardedValue, bool IsConstexpr = false);
6837 
6838  // Marks SS invalid if it represents an incomplete type.
6840  // Complete an enum decl, maybe without a scope spec.
6842  CXXScopeSpec *SS = nullptr);
6843 
6846  bool EnteringContext = false);
6847  bool isDependentScopeSpecifier(const CXXScopeSpec &SS);
6849 
6850  /// The parser has parsed a global nested-name-specifier '::'.
6851  ///
6852  /// \param CCLoc The location of the '::'.
6853  ///
6854  /// \param SS The nested-name-specifier, which will be updated in-place
6855  /// to reflect the parsed nested-name-specifier.
6856  ///
6857  /// \returns true if an error occurred, false otherwise.
6859 
6860  /// The parser has parsed a '__super' nested-name-specifier.
6861  ///
6862  /// \param SuperLoc The location of the '__super' keyword.
6863  ///
6864  /// \param ColonColonLoc The location of the '::'.
6865  ///
6866  /// \param SS The nested-name-specifier, which will be updated in-place
6867  /// to reflect the parsed nested-name-specifier.
6868  ///
6869  /// \returns true if an error occurred, false otherwise.
6871  SourceLocation ColonColonLoc, CXXScopeSpec &SS);
6872 
6874  bool *CanCorrect = nullptr);
6876 
6877  /// Keeps information about an identifier in a nested-name-spec.
6878  ///
6880  /// The type of the object, if we're parsing nested-name-specifier in
6881  /// a member access expression.
6883 
6884  /// The identifier preceding the '::'.
6886 
6887  /// The location of the identifier.
6889 
6890  /// The location of the '::'.
6892 
6893  /// Creates info object for the most typical case.
6895  SourceLocation ColonColonLoc, ParsedType ObjectType = ParsedType())
6897  CCLoc(ColonColonLoc) {
6898  }
6899 
6901  SourceLocation ColonColonLoc, QualType ObjectType)
6902  : ObjectType(ParsedType::make(ObjectType)), Identifier(II),
6903  IdentifierLoc(IdLoc), CCLoc(ColonColonLoc) {
6904  }
6905  };
6906 
6908  NestedNameSpecInfo &IdInfo);
6909 
6911  NestedNameSpecInfo &IdInfo,
6912  bool EnteringContext,
6913  CXXScopeSpec &SS,
6914  NamedDecl *ScopeLookupResult,
6915  bool ErrorRecoveryLookup,
6916  bool *IsCorrectedToColon = nullptr,
6917  bool OnlyNamespace = false);
6918 
6919  /// The parser has parsed a nested-name-specifier 'identifier::'.
6920  ///
6921  /// \param S The scope in which this nested-name-specifier occurs.
6922  ///
6923  /// \param IdInfo Parser information about an identifier in the
6924  /// nested-name-spec.
6925  ///
6926  /// \param EnteringContext Whether we're entering the context nominated by
6927  /// this nested-name-specifier.
6928  ///
6929  /// \param SS The nested-name-specifier, which is both an input
6930  /// parameter (the nested-name-specifier before this type) and an
6931  /// output parameter (containing the full nested-name-specifier,
6932  /// including this new type).
6933  ///
6934  /// \param ErrorRecoveryLookup If true, then this method is called to improve
6935  /// error recovery. In this case do not emit error message.
6936  ///
6937  /// \param IsCorrectedToColon If not null, suggestions to replace '::' -> ':'
6938  /// are allowed. The bool value pointed by this parameter is set to 'true'
6939  /// if the identifier is treated as if it was followed by ':', not '::'.
6940  ///
6941  /// \param OnlyNamespace If true, only considers namespaces in lookup.
6942  ///
6943  /// \returns true if an error occurred, false otherwise.
6945  NestedNameSpecInfo &IdInfo,
6946  bool EnteringContext,
6947  CXXScopeSpec &SS,
6948  bool ErrorRecoveryLookup = false,
6949  bool *IsCorrectedToColon = nullptr,
6950  bool OnlyNamespace = false);
6951 
6953 
6955  const DeclSpec &DS,
6956  SourceLocation ColonColonLoc);
6957 
6959  NestedNameSpecInfo &IdInfo,
6960  bool EnteringContext);
6961 
6962  /// The parser has parsed a nested-name-specifier
6963  /// 'template[opt] template-name < template-args >::'.
6964  ///
6965  /// \param S The scope in which this nested-name-specifier occurs.
6966  ///
6967  /// \param SS The nested-name-specifier, which is both an input
6968  /// parameter (the nested-name-specifier before this type) and an
6969  /// output parameter (containing the full nested-name-specifier,
6970  /// including this new type).
6971  ///
6972  /// \param TemplateKWLoc the location of the 'template' keyword, if any.
6973  /// \param TemplateName the template name.
6974  /// \param TemplateNameLoc The location of the template name.
6975  /// \param LAngleLoc The location of the opening angle bracket ('<').
6976  /// \param TemplateArgs The template arguments.
6977  /// \param RAngleLoc The location of the closing angle bracket ('>').
6978  /// \param CCLoc The location of the '::'.
6979  ///
6980  /// \param EnteringContext Whether we're entering the context of the
6981  /// nested-name-specifier.
6982  ///
6983  ///
6984  /// \returns true if an error occurred, false otherwise.
6986  CXXScopeSpec &SS,
6987  SourceLocation TemplateKWLoc,
6989  SourceLocation TemplateNameLoc,
6990  SourceLocation LAngleLoc,
6991  ASTTemplateArgsPtr TemplateArgs,
6992  SourceLocation RAngleLoc,
6993  SourceLocation CCLoc,
6994  bool EnteringContext);
6995 
6996  /// Given a C++ nested-name-specifier, produce an annotation value
6997  /// that the parser can use later to reconstruct the given
6998  /// nested-name-specifier.
6999  ///
7000  /// \param SS A nested-name-specifier.
7001  ///
7002  /// \returns A pointer containing all of the information in the
7003  /// nested-name-specifier \p SS.
7005 
7006  /// Given an annotation pointer for a nested-name-specifier, restore
7007  /// the nested-name-specifier structure.
7008  ///
7009  /// \param Annotation The annotation pointer, produced by
7010  /// \c SaveNestedNameSpecifierAnnotation().
7011  ///
7012  /// \param AnnotationRange The source range corresponding to the annotation.
7013  ///
7014  /// \param SS The nested-name-specifier that will be updated with the contents
7015  /// of the annotation pointer.
7016  void RestoreNestedNameSpecifierAnnotation(void *Annotation,
7017  SourceRange AnnotationRange,
7018  CXXScopeSpec &SS);
7019 
7020  bool ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS);
7021 
7022  /// ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global
7023  /// scope or nested-name-specifier) is parsed, part of a declarator-id.
7024  /// After this method is called, according to [C++ 3.4.3p3], names should be
7025  /// looked up in the declarator-id's scope, until the declarator is parsed and
7026  /// ActOnCXXExitDeclaratorScope is called.
7027  /// The 'SS' should be a non-empty valid CXXScopeSpec.
7029 
7030  /// ActOnCXXExitDeclaratorScope - Called when a declarator that previously
7031  /// invoked ActOnCXXEnterDeclaratorScope(), is finished. 'SS' is the same
7032  /// CXXScopeSpec that was passed to ActOnCXXEnterDeclaratorScope as well.
7033  /// Used to indicate that names should revert to being looked up in the
7034  /// defining scope.
7035  void ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS);
7036 
7037  /// ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an
7038  /// initializer for the declaration 'Dcl'.
7039  /// After this method is called, according to [C++ 3.4.1p13], if 'Dcl' is a
7040  /// static data member of class X, names should be looked up in the scope of
7041  /// class X.
7042  void ActOnCXXEnterDeclInitializer(Scope *S, Decl *Dcl);
7043 
7044  /// ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an
7045  /// initializer for the declaration 'Dcl'.
7046  void ActOnCXXExitDeclInitializer(Scope *S, Decl *Dcl);
7047 
7048  /// Create a new lambda closure type.
7050  TypeSourceInfo *Info,
7051  unsigned LambdaDependencyKind,
7052  LambdaCaptureDefault CaptureDefault);
7053 
7054  /// Start the definition of a lambda expression.
7056  SourceRange IntroducerRange,
7057  TypeSourceInfo *MethodType,
7058  SourceLocation EndLoc,
7059  ArrayRef<ParmVarDecl *> Params,
7060  ConstexprSpecKind ConstexprKind,
7061  Expr *TrailingRequiresClause);
7062 
7063  /// Number lambda for linkage purposes if necessary.
7064  void handleLambdaNumbering(
7065  CXXRecordDecl *Class, CXXMethodDecl *Method,
7066  Optional<std::tuple<bool, unsigned, unsigned, Decl *>> Mangling = None);
7067 
7068  /// Endow the lambda scope info with the relevant properties.
7070  CXXMethodDecl *CallOperator,
7071  SourceRange IntroducerRange,
7072  LambdaCaptureDefault CaptureDefault,
7073  SourceLocation CaptureDefaultLoc,
7074  bool ExplicitParams,
7075  bool ExplicitResultType,
7076  bool Mutable);
7077 
7078  /// Perform initialization analysis of the init-capture and perform
7079  /// any implicit conversions such as an lvalue-to-rvalue conversion if
7080  /// not being used to initialize a reference.
7082  SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc,
7083  IdentifierInfo *Id, LambdaCaptureInitKind InitKind, Expr *&Init) {
7085  Loc, ByRef, EllipsisLoc, None, Id,
7086  InitKind != LambdaCaptureInitKind::CopyInit, Init));
7087  }
7089  SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc,
7090  Optional<unsigned> NumExpansions, IdentifierInfo *Id, bool DirectInit,
7091  Expr *&Init);
7092 
7093  /// Create a dummy variable within the declcontext of the lambda's
7094  /// call operator, for name lookup purposes for a lambda init capture.
7095  ///
7096  /// CodeGen handles emission of lambda captures, ignoring these dummy
7097  /// variables appropriately.
7099  QualType InitCaptureType,
7100  SourceLocation EllipsisLoc,
7101  IdentifierInfo *Id,
7102  unsigned InitStyle, Expr *Init);
7103 
7104  /// Add an init-capture to a lambda scope.
7105  void addInitCapture(sema::LambdaScopeInfo *LSI, VarDecl *Var);
7106 
7107  /// Note that we have finished the explicit captures for the
7108  /// given lambda.
7110 
7111  /// \brief This is called after parsing the explicit template parameter list
7112  /// on a lambda (if it exists) in C++2a.
7114  ArrayRef<NamedDecl *> TParams,
7115  SourceLocation RAngleLoc,
7116  ExprResult RequiresClause);
7117 
7118  /// Introduce the lambda parameters into scope.
7119  void addLambdaParameters(
7121  CXXMethodDecl *CallOperator, Scope *CurScope);
7122 
7123  /// Deduce a block or lambda's return type based on the return
7124  /// statements present in the body.
7126 
7127  /// ActOnStartOfLambdaDefinition - This is called just before we start
7128  /// parsing the body of a lambda; it analyzes the explicit captures and
7129  /// arguments, and sets up various data-structures for the body of the
7130  /// lambda.
7132  Declarator &ParamInfo, Scope *CurScope);
7133 
7134  /// ActOnLambdaError - If there is an error parsing a lambda, this callback
7135  /// is invoked to pop the information about the lambda.
7136  void ActOnLambdaError(SourceLocation StartLoc, Scope *CurScope,
7137  bool IsInstantiation = false);
7138 
7139  /// ActOnLambdaExpr - This is called when the body of a lambda expression
7140  /// was successfully completed.
7142  Scope *CurScope);
7143 
7144  /// Does copying/destroying the captured variable have side effects?
7145  bool CaptureHasSideEffects(const sema::Capture &From);
7146 
7147  /// Diagnose if an explicit lambda capture is unused. Returns true if a
7148  /// diagnostic is emitted.
7149  bool DiagnoseUnusedLambdaCapture(SourceRange CaptureRange,
7150  const sema::Capture &From);
7151 
7152  /// Build a FieldDecl suitable to hold the given capture.
7154 
7155  /// Initialize the given capture with a suitable expression.
7157  SourceLocation ImplicitCaptureLoc,
7158  bool IsOpenMPMapping = false);
7159 
7160  /// Complete a lambda-expression having processed and attached the
7161  /// lambda body.
7163  sema::LambdaScopeInfo *LSI);
7164 
7165  /// Get the return type to use for a lambda's conversion function(s) to
7166  /// function pointer type, given the type of the call operator.
7167  QualType
7169  CallingConv CC);
7170 
7171  /// Define the "body" of the conversion from a lambda object to a
7172  /// function pointer.
7173  ///
7174  /// This routine doesn't actually define a sensible body; rather, it fills
7175  /// in the initialization expression needed to copy the lambda object into
7176  /// the block, and IR generation actually generates the real body of the
7177  /// block pointer conversion.
7179  SourceLocation CurrentLoc, CXXConversionDecl *Conv);
7180 
7181  /// Define the "body" of the conversion from a lambda object to a
7182  /// block pointer.
7183  ///
7184  /// This routine doesn't actually define a sensible body; rather, it fills
7185  /// in the initialization expression needed to copy the lambda object into
7186  /// the block, and IR generation actually generates the real body of the
7187  /// block pointer conversion.
7189  CXXConversionDecl *Conv);
7190 
7192  SourceLocation ConvLocation,
7193  CXXConversionDecl *Conv,
7194  Expr *Src);
7195 
7196  /// Check whether the given expression is a valid constraint expression.
7197  /// A diagnostic is emitted if it is not, false is returned, and
7198  /// PossibleNonPrimary will be set to true if the failure might be due to a
7199  /// non-primary expression being used as an atomic constraint.
7200  bool CheckConstraintExpression(const Expr *CE, Token NextToken = Token(),
7201  bool *PossibleNonPrimary = nullptr,
7202  bool IsTrailingRequiresClause = false);
7203 
7204 private:
7205  /// Caches pairs of template-like decls whose associated constraints were
7206  /// checked for subsumption and whether or not the first's constraints did in
7207  /// fact subsume the second's.
7208  llvm::DenseMap<std::pair<NamedDecl *, NamedDecl *>, bool> SubsumptionCache;
7209  /// Caches the normalized associated constraints of declarations (concepts or
7210  /// constrained declarations). If an error occurred while normalizing the
7211  /// associated constraints of the template or concept, nullptr will be cached
7212  /// here.
7213  llvm::DenseMap<NamedDecl *, NormalizedConstraint *>
7214  NormalizationCache;
7215 
7216  llvm::ContextualFoldingSet<ConstraintSatisfaction, const ASTContext &>
7217  SatisfactionCache;
7218 
7219  /// Introduce the instantiated function parameters into the local
7220  /// instantiation scope, and set the parameter names to those used
7221  /// in the template.
7222  bool addInstantiatedParametersToScope(
7223  FunctionDecl *Function, const FunctionDecl *PatternDecl,
7225  const MultiLevelTemplateArgumentList &TemplateArgs);
7226 
7227 public:
7228  const NormalizedConstraint *
7230  NamedDecl *ConstrainedDecl, ArrayRef<const Expr *> AssociatedConstraints);
7231 
7232  /// \brief Check whether the given declaration's associated constraints are
7233  /// at least as constrained than another declaration's according to the
7234  /// partial ordering of constraints.
7235  ///
7236  /// \param Result If no error occurred, receives the result of true if D1 is
7237  /// at least constrained than D2, and false otherwise.
7238  ///
7239  /// \returns true if an error occurred, false otherwise.
7242  bool &Result);
7243 
7244  /// If D1 was not at least as constrained as D2, but would've been if a pair
7245  /// of atomic constraints involved had been declared in a concept and not
7246  /// repeated in two separate places in code.
7247  /// \returns true if such a diagnostic was emitted, false otherwise.
7250 
7251  /// \brief Check whether the given list of constraint expressions are
7252  /// satisfied (as if in a 'conjunction') given template arguments.
7253  /// \param Template the template-like entity that triggered the constraints
7254  /// check (either a concept or a constrained entity).
7255  /// \param ConstraintExprs a list of constraint expressions, treated as if
7256  /// they were 'AND'ed together.
7257  /// \param TemplateArgs the list of template arguments to substitute into the
7258  /// constraint expression.
7259  /// \param TemplateIDRange The source range of the template id that
7260  /// caused the constraints check.
7261  /// \param Satisfaction if true is returned, will contain details of the
7262  /// satisfaction, with enough information to diagnose an unsatisfied
7263  /// expression.
7264  /// \returns true if an error occurred and satisfaction could not be checked,
7265  /// false otherwise.
7267  const NamedDecl *Template, ArrayRef<const Expr *> ConstraintExprs,
7268  ArrayRef<TemplateArgument> TemplateArgs,
7269  SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction);
7270 
7271  /// \brief Check whether the given non-dependent constraint expression is
7272  /// satisfied. Returns false and updates Satisfaction with the satisfaction
7273  /// verdict if successful, emits a diagnostic and returns true if an error
7274  /// occurred and satisfaction could not be determined.
7275  ///
7276  /// \returns true if an error occurred, false otherwise.
7277  bool CheckConstraintSatisfaction(const Expr *ConstraintExpr,
7278  ConstraintSatisfaction &Satisfaction);
7279 
7280  /// Check whether the given function decl's trailing requires clause is
7281  /// satisfied, if any. Returns false and updates Satisfaction with the
7282  /// satisfaction verdict if successful, emits a diagnostic and returns true if
7283  /// an error occurred and satisfaction could not be determined.
7284  ///
7285  /// \returns true if an error occurred, false otherwise.
7286  bool CheckFunctionConstraints(const FunctionDecl *FD,
7287  ConstraintSatisfaction &Satisfaction,
7288  SourceLocation UsageLoc = SourceLocation());
7289 
7290 
7291  /// \brief Ensure that the given template arguments satisfy the constraints
7292  /// associated with the given template, emitting a diagnostic if they do not.
7293  ///
7294  /// \param Template The template to which the template arguments are being
7295  /// provided.
7296  ///
7297  /// \param TemplateArgs The converted, canonicalized template arguments.
7298  ///
7299  /// \param TemplateIDRange The source range of the template id that
7300  /// caused the constraints check.
7301  ///
7302  /// \returns true if the constrains are not satisfied or could not be checked
7303  /// for satisfaction, false if the constraints are satisfied.
7305  ArrayRef<TemplateArgument> TemplateArgs,
7306  SourceRange TemplateIDRange);
7307 
7308  /// \brief Emit diagnostics explaining why a constraint expression was deemed
7309  /// unsatisfied.
7310  /// \param First whether this is the first time an unsatisfied constraint is
7311  /// diagnosed for this error.
7312  void
7314  bool First = true);
7315 
7316  /// \brief Emit diagnostics explaining why a constraint expression was deemed
7317  /// unsatisfied.
7318  void
7320  bool First = true);
7321 
7322  // ParseObjCStringLiteral - Parse Objective-C string literals.
7324  ArrayRef<Expr *> Strings);
7325 
7327 
7328  /// BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the
7329  /// numeric literal expression. Type of the expression will be "NSNumber *"
7330  /// or "id" if NSNumber is unavailable.
7333  bool Value);
7335 
7336  /// BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the
7337  /// '@' prefixed parenthesized expression. The type of the expression will
7338  /// either be "NSNumber *", "NSString *" or "NSValue *" depending on the type
7339  /// of ValueType, which is allowed to be a built-in numeric type, "char *",
7340  /// "const char *" or C structure with attribute 'objc_boxable'.
7342 
7344  Expr *IndexExpr,
7345  ObjCMethodDecl *getterMethod,
7346  ObjCMethodDecl *setterMethod);
7347 
7350 
7352  TypeSourceInfo *EncodedTypeInfo,
7353  SourceLocation RParenLoc);
7355  CXXConversionDecl *Method,
7356  bool HadMultipleCandidates);
7357 
7359  SourceLocation EncodeLoc,
7360  SourceLocation LParenLoc,
7361  ParsedType Ty,
7362  SourceLocation RParenLoc);
7363 
7364  /// ParseObjCSelectorExpression - Build selector expression for \@selector
7366  SourceLocation AtLoc,
7367  SourceLocation SelLoc,
7368  SourceLocation LParenLoc,
7369  SourceLocation RParenLoc,
7370  bool WarnMultipleSelectors);
7371 
7372  /// ParseObjCProtocolExpression - Build protocol expression for \@protocol
7374  SourceLocation AtLoc,
7375  SourceLocation ProtoLoc,
7376  SourceLocation LParenLoc,
7377  SourceLocation ProtoIdLoc,
7378  SourceLocation RParenLoc);
7379 
7380  //===--------------------------------------------------------------------===//
7381  // C++ Declarations
7382  //
7384  SourceLocation ExternLoc,
7385  Expr *LangStr,
7386  SourceLocation LBraceLoc);
7388  Decl *LinkageSpec,
7389  SourceLocation RBraceLoc);
7390 
7391 
7392  //===--------------------------------------------------------------------===//
7393  // C++ Classes
7394  //
7396  bool isCurrentClassName(const IdentifierInfo &II, Scope *S,
7397  const CXXScopeSpec *SS = nullptr);
7398  bool isCurrentClassNameTypo(IdentifierInfo *&II, const CXXScopeSpec *SS);
7399 
7401  SourceLocation ColonLoc,
7402  const ParsedAttributesView &Attrs);
7403 
7405  Declarator &D,
7406  MultiTemplateParamsArg TemplateParameterLists,
7407  Expr *BitfieldWidth, const VirtSpecifiers &VS,
7408  InClassInitStyle InitStyle);
7409 
7412  SourceLocation EqualLoc,
7413  Expr *Init);
7414 
7415  MemInitResult ActOnMemInitializer(Decl *ConstructorD,
7416  Scope *S,
7417  CXXScopeSpec &SS,
7418  IdentifierInfo *MemberOrBase,
7419  ParsedType TemplateTypeTy,
7420  const DeclSpec &DS,
7421  SourceLocation IdLoc,
7422  SourceLocation LParenLoc,
7423  ArrayRef<Expr *> Args,
7424  SourceLocation RParenLoc,
7425  SourceLocation EllipsisLoc);
7426 
7427  MemInitResult ActOnMemInitializer(Decl *ConstructorD,
7428  Scope *S,
7429  CXXScopeSpec &SS,
7430  IdentifierInfo *MemberOrBase,
7431  ParsedType TemplateTypeTy,
7432  const DeclSpec &DS,
7433  SourceLocation IdLoc,
7434  Expr *InitList,
7435  SourceLocation EllipsisLoc);
7436 
7437  MemInitResult BuildMemInitializer(Decl *ConstructorD,
7438  Scope *S,
7439  CXXScopeSpec &SS,
7440  IdentifierInfo *MemberOrBase,
7441  ParsedType TemplateTypeTy,
7442  const DeclSpec &DS,
7443  SourceLocation IdLoc,
7444  Expr *Init,
7445  SourceLocation EllipsisLoc);
7446 
7448  Expr *Init,
7449  SourceLocation IdLoc);
7450 
7452  TypeSourceInfo *BaseTInfo,
7453  Expr *Init,
7454  CXXRecordDecl *ClassDecl,
7455  SourceLocation EllipsisLoc);
7456 
7458  Expr *Init,
7459  CXXRecordDecl *ClassDecl);
7460 
7461  bool SetDelegatingInitializer(CXXConstructorDecl *Constructor,
7462  CXXCtorInitializer *Initializer);
7463 
7464  bool SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors,
7465  ArrayRef<CXXCtorInitializer *> Initializers = None);
7466 
7467  void SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation);
7468 
7469 
7470  /// MarkBaseAndMemberDestructorsReferenced - Given a record decl,
7471  /// mark all the non-trivial destructors of its members and bases as
7472  /// referenced.
7474  CXXRecordDecl *Record);
7475 
7476  /// Mark destructors of virtual bases of this class referenced. In the Itanium
7477  /// C++ ABI, this is done when emitting a destructor for any non-abstract
7478  /// class. In the Microsoft C++ ABI, this is done any time a class's
7479  /// destructor is referenced.
7481  SourceLocation Location, CXXRecordDecl *ClassDecl,
7482  llvm::SmallPtrSetImpl<const RecordType *> *DirectVirtualBases = nullptr);
7483 
7484  /// Do semantic checks to allow the complete destructor variant to be emitted
7485  /// when the destructor is defined in another translation unit. In the Itanium
7486  /// C++ ABI, destructor variants are emitted together. In the MS C++ ABI, they
7487  /// can be emitted in separate TUs. To emit the complete variant, run a subset
7488  /// of the checks performed when emitting a regular destructor.
7489  void CheckCompleteDestructorVariant(SourceLocation CurrentLocation,
7490  CXXDestructorDecl *Dtor);
7491 
7492  /// The list of classes whose vtables have been used within
7493  /// this translation unit, and the source locations at which the
7494  /// first use occurred.
7495  typedef std::pair<CXXRecordDecl*, SourceLocation> VTableUse;
7496 
7497  /// The list of vtables that are required but have not yet been
7498  /// materialized.
7500 
7501  /// The set of classes whose vtables have been used within
7502  /// this translation unit, and a bit that will be true if the vtable is
7503  /// required to be emitted (otherwise, it should be emitted only if needed
7504  /// by code generation).
7505  llvm::DenseMap<CXXRecordDecl *, bool> VTablesUsed;
7506 
7507  /// Load any externally-stored vtable uses.
7508  void LoadExternalVTableUses();
7509 
7510  /// Note that the vtable for the given class was used at the
7511  /// given location.
7512  void MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class,
7513  bool DefinitionRequired = false);
7514 
7515  /// Mark the exception specifications of all virtual member functions
7516  /// in the given class as needed.
7518  const CXXRecordDecl *RD);
7519 
7520  /// MarkVirtualMembersReferenced - Will mark all members of the given
7521  /// CXXRecordDecl referenced.
7523  bool ConstexprOnly = false);
7524 
7525  /// Define all of the vtables that have been used in this
7526  /// translation unit and reference any virtual members used by those
7527  /// vtables.
7528  ///
7529  /// \returns true if any work was done, false otherwise.
7530  bool DefineUsedVTables();
7531 
7533 
7534  void ActOnMemInitializers(Decl *ConstructorDecl,
7535  SourceLocation ColonLoc,
7537  bool AnyErrors);
7538 
7539  /// Check class-level dllimport/dllexport attribute. The caller must
7540  /// ensure that referenceDLLExportedClassMethods is called some point later
7541  /// when all outer classes of Class are complete.
7544 
7546 
7548  CXXRecordDecl *Class, Attr *ClassAttr,
7549  ClassTemplateSpecializationDecl *BaseTemplateSpec,
7550  SourceLocation BaseLoc);
7551 
7552  /// Add gsl::Pointer attribute to std::container::iterator
7553  /// \param ND The declaration that introduces the name
7554  /// std::container::iterator. \param UnderlyingRecord The record named by ND.
7555  void inferGslPointerAttribute(NamedDecl *ND, CXXRecordDecl *UnderlyingRecord);
7556 
7557  /// Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types.
7559 
7560  /// Add [[gsl::Pointer]] attributes for std:: types.
7562 
7563  void CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record);
7564 
7565  /// Check that the C++ class annoated with "trivial_abi" satisfies all the
7566  /// conditions that are needed for the attribute to have an effect.
7568 
7570  Decl *TagDecl, SourceLocation LBrac,
7571  SourceLocation RBrac,
7572  const ParsedAttributesView &AttrList);
7575 
7577  unsigned ActOnReenterTemplateScope(Decl *Template,
7578  llvm::function_ref<Scope *()> EnterScope);
7581  void ActOnDelayedCXXMethodParameter(Scope *S, Decl *Param);
7586  CachedTokens &Toks);
7589 
7591  Expr *AssertExpr,
7592  Expr *AssertMessageExpr,
7593  SourceLocation RParenLoc);
7595  Expr *AssertExpr,
7596  StringLiteral *AssertMessageExpr,
7597  SourceLocation RParenLoc,
7598  bool Failed);
7599 
7601  SourceLocation FriendLoc,
7602  TypeSourceInfo *TSInfo);
7603  Decl *ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS,
7604  MultiTemplateParamsArg TemplateParams);
7606  MultiTemplateParamsArg TemplateParams);
7607 
7609  StorageClass& SC);
7610  void CheckConstructor(CXXConstructorDecl *Constructor);
7612  StorageClass& SC);
7613  bool CheckDestructor(CXXDestructorDecl *Destructor);
7615  StorageClass& SC);
7618  StorageClass &SC);
7620 
7622 
7624  CXXSpecialMember CSM);
7626 
7633 
7634  //===--------------------------------------------------------------------===//
7635  // C++ Derived Classes
7636  //
7637 
7638  /// ActOnBaseSpecifier - Parsed a base specifier
7640  SourceRange SpecifierRange,
7641  bool Virtual, AccessSpecifier Access,
7642  TypeSourceInfo *TInfo,
7643  SourceLocation EllipsisLoc);
7644 
7645  BaseResult ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange,
7646  const ParsedAttributesView &Attrs, bool Virtual,
7647  AccessSpecifier Access, ParsedType basetype,
7648  SourceLocation BaseLoc,
7649  SourceLocation EllipsisLoc);
7650 
7651  bool AttachBaseSpecifiers(CXXRecordDecl *Class,
7653  void ActOnBaseSpecifiers(Decl *ClassDecl,
7655 
7656  bool IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base);
7657  bool IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base,
7658  CXXBasePaths &Paths);
7659 
7660  // FIXME: I don't like this name.
7661  void BuildBasePathArray(const CXXBasePaths &Paths, CXXCastPath &BasePath);
7662 
7664  SourceLocation Loc, SourceRange Range,
7665  CXXCastPath *BasePath = nullptr,
7666  bool IgnoreAccess = false);
7668  unsigned InaccessibleBaseID,
7669  unsigned AmbiguousBaseConvID,
7670  SourceLocation Loc, SourceRange Range,
7671  DeclarationName Name,
7672  CXXCastPath *BasePath,
7673  bool IgnoreAccess = false);
7674 
7676 
7678  const CXXMethodDecl *Old);
7679 
7680  /// CheckOverridingFunctionReturnType - Checks whether the return types are
7681  /// covariant, according to C++ [class.virtual]p5.
7683  const CXXMethodDecl *Old);
7684 
7685  /// CheckOverridingFunctionExceptionSpec - Checks whether the exception
7686  /// spec is a subset of base spec.
7688  const CXXMethodDecl *Old);
7689 
7690  bool CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange);
7691 
7692  /// CheckOverrideControl - Check C++11 override control semantics.
7694 
7695  /// CheckVirtualSYCLAddIRAttributesFunctionAttr - Check and diagnose if a
7696  /// SYCLAddIRAttributesFunctionAttr is attached to a virtual member function.
7698 
7699  /// DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was
7700  /// not used in the declaration of an overriding method.
7701  void DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent);
7702 
7703  /// CheckForFunctionMarkedFinal - Checks whether a virtual member function
7704  /// overrides a virtual member function marked 'final', according to
7705  /// C++11 [class.virtual]p4.
7707  const CXXMethodDecl *Old);
7708 
7709 
7710  //===--------------------------------------------------------------------===//
7711  // C++ Access Control
7712  //
7713 
7719  };
7720 
7721  bool SetMemberAccessSpecifier(NamedDecl *MemberDecl,
7722  NamedDecl *PrevMemberDecl,
7723  AccessSpecifier LexicalAS);
7724 
7726  DeclAccessPair FoundDecl);
7728  DeclAccessPair FoundDecl);
7730  SourceRange PlacementRange,
7731  CXXRecordDecl *NamingClass,
7732  DeclAccessPair FoundDecl,
7733  bool Diagnose = true);
7735  CXXConstructorDecl *D,
7736  DeclAccessPair FoundDecl,
7737  const InitializedEntity &Entity,
7738  bool IsCopyBindingRefToTemp = false);
7740  CXXConstructorDecl *D,
7741  DeclAccessPair FoundDecl,
7742  const InitializedEntity &Entity,
7743  const PartialDiagnostic &PDiag);
7745  CXXDestructorDecl *Dtor,
7746  const PartialDiagnostic &PDiag,
7747  QualType objectType = QualType());
7750  CXXRecordDecl *NamingClass,
7751  DeclAccessPair Found);
7752  AccessResult
7754  CXXRecordDecl *DecomposedClass,
7755  DeclAccessPair Field);
7757  const SourceRange &,
7758  DeclAccessPair FoundDecl);
7760  Expr *ObjectExpr,
7761  Expr *ArgExpr,
7762  DeclAccessPair FoundDecl);
7764  ArrayRef<Expr *> ArgExprs,
7765  DeclAccessPair FoundDecl);
7767  DeclAccessPair FoundDecl);
7769  QualType Base, QualType Derived,
7770  const CXXBasePath &Path,
7771  unsigned DiagID,
7772  bool ForceCheck = false,
7773  bool ForceUnprivileged = false);
7774  void CheckLookupAccess(const LookupResult &R);
7775  bool IsSimplyAccessible(NamedDecl *Decl, CXXRecordDecl *NamingClass,
7776  QualType BaseType);
7777  bool isMemberAccessibleForDeletion(CXXRecordDecl *NamingClass,
7778  DeclAccessPair Found, QualType ObjectType,
7779  SourceLocation Loc,
7780  const PartialDiagnostic &Diag);
7782  DeclAccessPair Found,
7783  QualType ObjectType) {
7784  return isMemberAccessibleForDeletion(NamingClass, Found, ObjectType,
7785  SourceLocation(), PDiag());
7786  }
7787 
7789  const MultiLevelTemplateArgumentList &TemplateArgs);
7790  void PerformDependentDiagnostics(const DeclContext *Pattern,
7791  const MultiLevelTemplateArgumentList &TemplateArgs);
7792 
7794 
7795  /// When true, access checking violations are treated as SFINAE
7796  /// failures rather than hard errors.
7798 
7808  };
7809 
7810  bool isAbstractType(SourceLocation Loc, QualType T);
7812  TypeDiagnoser &Diagnoser);
7813  template <typename... Ts>
7814  bool RequireNonAbstractType(SourceLocation Loc, QualType T, unsigned DiagID,
7815  const Ts &...Args) {
7816  BoundTypeDiagnoser<Ts...> Diagnoser(DiagID, Args...);
7817  return RequireNonAbstractType(Loc, T, Diagnoser);
7818  }
7819 
7820  void DiagnoseAbstractType(const CXXRecordDecl *RD);
7821 
7822  //===--------------------------------------------------------------------===//
7823  // C++ Overloaded Operators [C++ 13.5]
7824  //
7825 
7827 
7829 
7830  //===--------------------------------------------------------------------===//
7831  // C++ Templates [C++ 14]
7832  //
7834  bool AllowFunctionTemplates = true,
7835  bool AllowDependent = true);
7837  bool AllowFunctionTemplates = true,
7838  bool AllowDependent = true,
7839  bool AllowNonTemplateFunctions = false);
7840  /// Try to interpret the lookup result D as a template-name.
7841  ///
7842  /// \param D A declaration found by name lookup.
7843  /// \param AllowFunctionTemplates Whether function templates should be
7844  /// considered valid results.
7845  /// \param AllowDependent Whether unresolved using declarations (that might
7846  /// name templates) should be considered valid results.
7848  bool AllowFunctionTemplates = true,
7849  bool AllowDependent = true);
7850 
7852  /// Whether and why a template name is required in this lookup.
7854  public:
7855  /// Template name is required if TemplateKWLoc is valid.
7857  : TemplateKW(TemplateKWLoc) {}
7858  /// Template name is unconditionally required.
7860 
7862  return TemplateKW.getValueOr(SourceLocation());
7863  }
7864  bool hasTemplateKeyword() const { return getTemplateKeywordLoc().isValid(); }
7865  bool isRequired() const { return TemplateKW != SourceLocation(); }
7866  explicit operator bool() const { return isRequired(); }
7867 
7868  private:
7869  llvm::Optional<SourceLocation> TemplateKW;
7870  };
7871 
7872  enum class AssumedTemplateKind {
7873  /// This is not assumed to be a template name.
7874  None,
7875  /// This is assumed to be a template name because lookup found nothing.
7876  FoundNothing,
7877  /// This is assumed to be a template name because lookup found one or more
7878  /// functions (but no function templates).
7880  };
7881  bool LookupTemplateName(
7882  LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType,
7883  bool EnteringContext, bool &MemberOfUnknownSpecialization,
7884  RequiredTemplateKind RequiredTemplate = SourceLocation(),
7885  AssumedTemplateKind *ATK = nullptr, bool AllowTypoCorrection = true);
7886 
7888  CXXScopeSpec &SS,
7889  bool hasTemplateKeyword,
7890  const UnqualifiedId &Name,
7891  ParsedType ObjectType,
7892  bool EnteringContext,
7893  TemplateTy &Template,
7894  bool &MemberOfUnknownSpecialization,
7895  bool Disambiguation = false);
7896 
7897  /// Try to resolve an undeclared template name as a type template.
7898  ///
7899  /// Sets II to the identifier corresponding to the template name, and updates
7900  /// Name to a corresponding (typo-corrected) type template name and TNK to
7901  /// the corresponding kind, if possible.
7903  TemplateNameKind &TNK,
7904  SourceLocation NameLoc,
7905  IdentifierInfo *&II);
7906 
7908  SourceLocation NameLoc,
7909  bool Diagnose = true);
7910 
7911  /// Determine whether a particular identifier might be the name in a C++1z
7912  /// deduction-guide declaration.
7913  bool isDeductionGuideName(Scope *S, const IdentifierInfo &Name,
7914  SourceLocation NameLoc,
7915  ParsedTemplateTy *Template = nullptr);
7916 
7918  SourceLocation IILoc,
7919  Scope *S,
7920  const CXXScopeSpec *SS,
7921  TemplateTy &SuggestedTemplate,
7922  TemplateNameKind &SuggestedKind);
7923 
7924  bool DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation,
7925  NamedDecl *Instantiation,
7926  bool InstantiatedFromMember,
7927  const NamedDecl *Pattern,
7928  const NamedDecl *PatternDef,
7930  bool Complain = true);
7931 
7934 
7935  NamedDecl *ActOnTypeParameter(Scope *S, bool Typename,
7936  SourceLocation EllipsisLoc,
7937  SourceLocation KeyLoc,
7938  IdentifierInfo *ParamName,
7939  SourceLocation ParamNameLoc,
7940  unsigned Depth, unsigned Position,
7941  SourceLocation EqualLoc,
7942  ParsedType DefaultArg, bool HasTypeConstraint);
7943 
7944  bool ActOnTypeConstraint(const CXXScopeSpec &SS,
7946  TemplateTypeParmDecl *ConstrainedParameter,
7947  SourceLocation EllipsisLoc);
7948  bool BuildTypeConstraint(const CXXScopeSpec &SS,
7950  TemplateTypeParmDecl *ConstrainedParameter,
7951  SourceLocation EllipsisLoc,
7952  bool AllowUnexpandedPack);
7953 
7955  DeclarationNameInfo NameInfo,
7956  ConceptDecl *NamedConcept,
7957  const TemplateArgumentListInfo *TemplateArgs,
7958  TemplateTypeParmDecl *ConstrainedParameter,
7959  SourceLocation EllipsisLoc);
7960 
7962  NonTypeTemplateParmDecl *ConstrainedParameter,
7963  SourceLocation EllipsisLoc);
7964 
7966 
7968  SourceLocation Loc);
7970 
7972  unsigned Depth,
7973  unsigned Position,
7974  SourceLocation EqualLoc,
7975  Expr *DefaultArg);
7977  SourceLocation TmpLoc,
7978  TemplateParameterList *Params,
7979  SourceLocation EllipsisLoc,
7980  IdentifierInfo *ParamName,
7981  SourceLocation ParamNameLoc,
7982  unsigned Depth,
7983  unsigned Position,
7984  SourceLocation EqualLoc,
7985  ParsedTemplateArgument DefaultArg);
7986 
7989  SourceLocation ExportLoc,
7990  SourceLocation TemplateLoc,
7991  SourceLocation LAngleLoc,
7992  ArrayRef<NamedDecl *> Params,
7993  SourceLocation RAngleLoc,
7994  Expr *RequiresClause);
7995 
7996  /// The context in which we are checking a template parameter list.
8006  };
8007 
8009  TemplateParameterList *OldParams,
8011  SkipBodyInfo *SkipBody = nullptr);
8013  SourceLocation DeclStartLoc, SourceLocation DeclLoc,
8014  const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId,
8016  bool IsFriend, bool &IsMemberSpecialization, bool &Invalid,
8017  bool SuppressDiagnostic = false);
8018 
8020  Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc,
8021  CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc,
8022  const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams,
8023  AccessSpecifier AS, SourceLocation ModulePrivateLoc,
8024  SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists,
8025  TemplateParameterList **OuterTemplateParamLists,
8026  SkipBodyInfo *SkipBody = nullptr);
8027 
8029  QualType NTTPType,
8030  SourceLocation Loc);
8031 
8032  /// Get a template argument mapping the given template parameter to itself,
8033  /// e.g. for X in \c template<int X>, this would return an expression template
8034  /// argument referencing X.
8036  SourceLocation Location);
8037 
8040 
8042 
8044 
8046  SourceLocation TemplateLoc,
8047  TemplateArgumentListInfo &TemplateArgs);
8048 
8049  TypeResult
8050  ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
8051  TemplateTy Template, IdentifierInfo *TemplateII,
8052  SourceLocation TemplateIILoc, SourceLocation LAngleLoc,
8053  ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc,
8054  bool IsCtorOrDtorName = false, bool IsClassName = false);
8055 
8056  /// Parsed an elaborated-type-specifier that refers to a template-id,
8057  /// such as \c class T::template apply<U>.
8059  TypeSpecifierType TagSpec,
8060  SourceLocation TagLoc,
8061  CXXScopeSpec &SS,
8062  SourceLocation TemplateKWLoc,
8063  TemplateTy TemplateD,
8064  SourceLocation TemplateLoc,
8065  SourceLocation LAngleLoc,
8066  ASTTemplateArgsPtr TemplateArgsIn,
8067  SourceLocation RAngleLoc);
8068 
8070  Scope *S, Declarator &D, TypeSourceInfo *DI,
8071  SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams,
8073 
8074  /// Get the specialization of the given variable template corresponding to
8075  /// the specified argument list, or a null-but-valid result if the arguments
8076  /// are dependent.
8078  SourceLocation TemplateLoc,
8079  SourceLocation TemplateNameLoc,
8080  const TemplateArgumentListInfo &TemplateArgs);
8081 
8082  /// Form a reference to the specialization of the given variable template
8083  /// corresponding to the specified argument list, or a null-but-valid result
8084  /// if the arguments are dependent.
8086  const DeclarationNameInfo &NameInfo,
8087  VarTemplateDecl *Template,
8088  SourceLocation TemplateLoc,
8089  const TemplateArgumentListInfo *TemplateArgs);
8090 
8091  ExprResult
8093  SourceLocation TemplateKWLoc,
8094  const DeclarationNameInfo &ConceptNameInfo,
8095  NamedDecl *FoundDecl, ConceptDecl *NamedConcept,
8096  const TemplateArgumentListInfo *TemplateArgs);
8097 
8099 
8101  SourceLocation TemplateKWLoc,
8102  LookupResult &R,
8103  bool RequiresADL,
8104  const TemplateArgumentListInfo *TemplateArgs);
8105 
8107  SourceLocation TemplateKWLoc,
8108  const DeclarationNameInfo &NameInfo,
8109  const TemplateArgumentListInfo *TemplateArgs);
8110 
8112  Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc,
8113  const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext,
8114  TemplateTy &Template, bool AllowInjectedClassName = false);
8115 
8117  Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc,
8118  SourceLocation ModulePrivateLoc, CXXScopeSpec &SS,
8119  TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr,
8120  MultiTemplateParamsArg TemplateParameterLists,
8121  SkipBodyInfo *SkipBody = nullptr);
8122 
8124  TemplateDecl *PrimaryTemplate,
8125  unsigned NumExplicitArgs,
8131 
8133  MultiTemplateParamsArg TemplateParameterLists,
8134  Declarator &D);
8135 
8136  bool
8139  NamedDecl *PrevDecl,
8141  SourceLocation PrevPtOfInstantiation,
8142  bool &SuppressNew);
8143 
8145  const TemplateArgumentListInfo &ExplicitTemplateArgs,
8147 
8149  FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs,
8150  LookupResult &Previous, bool QualifiedFriend = false);
8153 
8155  Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc,
8156  unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS,
8157  TemplateTy Template, SourceLocation TemplateNameLoc,
8158  SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs,
8159  SourceLocation RAngleLoc, const ParsedAttributesView &Attr);
8160 
8162  SourceLocation TemplateLoc,
8163  unsigned TagSpec, SourceLocation KWLoc,
8164  CXXScopeSpec &SS, IdentifierInfo *Name,
8165  SourceLocation NameLoc,
8166  const ParsedAttributesView &Attr);
8167 
8169  SourceLocation ExternLoc,
8170  SourceLocation TemplateLoc,
8171  Declarator &D);
8172 
8175  SourceLocation TemplateLoc,
8176  SourceLocation RAngleLoc,
8177  Decl *Param,
8179  &Converted,
8180  bool &HasDefaultArg);
8181 
8182  /// Specifies the context in which a particular template
8183  /// argument is being checked.
8185  /// The template argument was specified in the code or was
8186  /// instantiated with some deduced template arguments.
8188 
8189  /// The template argument was deduced via template argument
8190  /// deduction.
8192 
8193  /// The template argument was deduced from an array bound
8194  /// via template argument deduction.
8196  };
8197 
8198  bool CheckTemplateArgument(NamedDecl *Param,
8199  TemplateArgumentLoc &Arg,
8200  NamedDecl *Template,
8201  SourceLocation TemplateLoc,
8202  SourceLocation RAngleLoc,
8203  unsigned ArgumentPackIndex,
8206 
8207  /// Check that the given template arguments can be be provided to
8208  /// the given template, converting the arguments along the way.
8209  ///
8210  /// \param Template The template to which the template arguments are being
8211  /// provided.
8212  ///
8213  /// \param TemplateLoc The location of the template name in the source.
8214  ///
8215  /// \param TemplateArgs The list of template arguments. If the template is
8216  /// a template template parameter, this function may extend the set of
8217  /// template arguments to also include substituted, defaulted template
8218  /// arguments.
8219  ///
8220  /// \param PartialTemplateArgs True if the list of template arguments is
8221  /// intentionally partial, e.g., because we're checking just the initial
8222  /// set of template arguments.
8223  ///
8224  /// \param Converted Will receive the converted, canonicalized template
8225  /// arguments.
8226  ///
8227  /// \param UpdateArgsWithConversions If \c true, update \p TemplateArgs to
8228  /// contain the converted forms of the template arguments as written.
8229  /// Otherwise, \p TemplateArgs will not be modified.
8230  ///
8231  /// \param ConstraintsNotSatisfied If provided, and an error occurred, will
8232  /// receive true if the cause for the error is the associated constraints of
8233  /// the template not being satisfied by the template arguments.
8234  ///
8235  /// \returns true if an error occurred, false otherwise.
8236  bool CheckTemplateArgumentList(TemplateDecl *Template,
8237  SourceLocation TemplateLoc,
8238  TemplateArgumentListInfo &TemplateArgs,
8239  bool PartialTemplateArgs,
8241  bool UpdateArgsWithConversions = true,
8242  bool *ConstraintsNotSatisfied = nullptr);
8243 
8245  TemplateArgumentLoc &Arg,
8247 
8250  QualType InstantiatedParamType, Expr *Arg,
8251  TemplateArgument &Converted,
8254  TemplateParameterList *Params,
8255  TemplateArgumentLoc &Arg);
8256 
8257  ExprResult
8259  QualType ParamType,
8260  SourceLocation Loc);
8261  ExprResult
8263  SourceLocation Loc);
8264 
8265  /// Enumeration describing how template parameter lists are compared
8266  /// for equality.
8268  /// We are matching the template parameter lists of two templates
8269  /// that might be redeclarations.
8270  ///
8271  /// \code
8272  /// template<typename T> struct X;
8273  /// template<typename T> struct X;
8274  /// \endcode
8276 
8277  /// We are matching the template parameter lists of two template
8278  /// template parameters as part of matching the template parameter lists
8279  /// of two templates that might be redeclarations.
8280  ///
8281  /// \code
8282  /// template<template<int I> class TT> struct X;
8283  /// template<template<int Value> class Other> struct X;
8284  /// \endcode
8286 
8287  /// We are matching the template parameter lists of a template
8288  /// template argument against the template parameter lists of a template
8289  /// template parameter.
8290  ///
8291  /// \code
8292  /// template<template<int Value> class Metafun> struct X;
8293  /// template<int Value> struct integer_c;
8294  /// X<integer_c> xic;
8295  /// \endcode
8297  };
8298 
8300  TemplateParameterList *Old,
8301  bool Complain,
8303  SourceLocation TemplateArgLoc
8304  = SourceLocation());
8305 
8306  bool CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams);
8307 
8308  /// Called when the parser has parsed a C++ typename
8309  /// specifier, e.g., "typename T::type".
8310  ///
8311  /// \param S The scope in which this typename type occurs.
8312  /// \param TypenameLoc the location of the 'typename' keyword
8313  /// \param SS the nested-name-specifier following the typename (e.g., 'T::').
8314  /// \param II the identifier we're retrieving (e.g., 'type' in the example).
8315  /// \param IdLoc the location of the identifier.
8316  TypeResult
8317  ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
8318  const CXXScopeSpec &SS, const IdentifierInfo &II,
8319  SourceLocation IdLoc);
8320 
8321  /// Called when the parser has parsed a C++ typename
8322  /// specifier that ends in a template-id, e.g.,
8323  /// "typename MetaFun::template apply<T1, T2>".
8324  ///
8325  /// \param S The scope in which this typename type occurs.
8326  /// \param TypenameLoc the location of the 'typename' keyword
8327  /// \param SS the nested-name-specifier following the typename (e.g., 'T::').
8328  /// \param TemplateLoc the location of the 'template' keyword, if any.
8329  /// \param TemplateName The template name.
8330  /// \param TemplateII The identifier used to name the template.
8331  /// \param TemplateIILoc The location of the template name.
8332  /// \param LAngleLoc The location of the opening angle bracket ('<').
8333  /// \param TemplateArgs The template arguments.
8334  /// \param RAngleLoc The location of the closing angle bracket ('>').
8335  TypeResult
8336  ActOnTypenameType(Scope *S, SourceLocation TypenameLoc,
8337  const CXXScopeSpec &SS,
8338  SourceLocation TemplateLoc,
8340  IdentifierInfo *TemplateII,
8341  SourceLocation TemplateIILoc,
8342  SourceLocation LAngleLoc,
8343  ASTTemplateArgsPtr TemplateArgs,
8344  SourceLocation RAngleLoc);
8345 
8347  SourceLocation KeywordLoc,
8348  NestedNameSpecifierLoc QualifierLoc,
8349  const IdentifierInfo &II,
8350  SourceLocation IILoc,
8351  TypeSourceInfo **TSI,
8352  bool DeducedTSTContext);
8353 
8355  SourceLocation KeywordLoc,
8356  NestedNameSpecifierLoc QualifierLoc,
8357  const IdentifierInfo &II,
8358  SourceLocation IILoc,
8359  bool DeducedTSTContext = true);
8360 
8361 
8363  SourceLocation Loc,
8364  DeclarationName Name);
8366 
8369  TemplateParameterList *Params);
8370 
8371  std::string
8373  const TemplateArgumentList &Args);
8374 
8375  std::string
8377  const TemplateArgument *Args,
8378  unsigned NumArgs);
8379 
8380  //===--------------------------------------------------------------------===//
8381  // C++ Concepts
8382  //===--------------------------------------------------------------------===//
8384  Scope *S, MultiTemplateParamsArg TemplateParameterLists,
8385  IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr);
8386 
8388  ActOnStartRequiresExpr(SourceLocation RequiresKWLoc,
8389  ArrayRef<ParmVarDecl *> LocalParameters,
8390  Scope *BodyScope);
8391  void ActOnFinishRequiresExpr();
8394  SourceLocation TypenameKWLoc, CXXScopeSpec &SS, SourceLocation NameLoc,
8395  IdentifierInfo *TypeName, TemplateIdAnnotation *TemplateId);
8397  SourceLocation NoexceptLoc);
8400  Expr *E, SourceLocation NoexceptLoc, CXXScopeSpec &SS,
8405  Expr *E, bool IsSatisfied, SourceLocation NoexceptLoc,
8406  concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement);
8410  bool IsSatisfied, SourceLocation NoexceptLoc,
8411  concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement);
8421  RequiresExprBodyDecl *Body,
8422  ArrayRef<ParmVarDecl *> LocalParameters,
8423  ArrayRef<concepts::Requirement *> Requirements,
8424  SourceLocation ClosingBraceLoc);
8425 
8426  //===--------------------------------------------------------------------===//
8427  // C++ Variadic Templates (C++0x [temp.variadic])
8428  //===--------------------------------------------------------------------===//
8429 
8430  /// Determine whether an unexpanded parameter pack might be permitted in this
8431  /// location. Useful for error recovery.
8433 
8434  /// The context in which an unexpanded parameter pack is
8435  /// being diagnosed.
8436  ///
8437  /// Note that the values of this enumeration line up with the first
8438  /// argument to the \c err_unexpanded_parameter_pack diagnostic.
8440  /// An arbitrary expression.
8442 
8443  /// The base type of a class type.
8445 
8446  /// The type of an arbitrary declaration.
8448 
8449  /// The type of a data member.
8451 
8452  /// The size of a bit-field.
8454 
8455  /// The expression in a static assertion.
8457 
8458  /// The fixed underlying type of an enumeration.
8460 
8461  /// The enumerator value.
8463 
8464  /// A using declaration.
8466 
8467  /// A friend declaration.
8469 
8470  /// A declaration qualifier.
8472 
8473  /// An initializer.
8475 
8476  /// A default argument.
8478 
8479  /// The type of a non-type template parameter.
8481 
8482  /// The type of an exception.
8484 
8485  /// Partial specialization.
8487 
8488  /// Microsoft __if_exists.
8490 
8491  /// Microsoft __if_not_exists.
8493 
8494  /// Lambda expression.
8496 
8497  /// Block expression.
8499 
8500  /// A type constraint.
8502 
8503  // A requirement in a requires-expression.
8505 
8506  // A requires-clause.
8508  };
8509 
8510  /// Diagnose unexpanded parameter packs.
8511  ///
8512  /// \param Loc The location at which we should emit the diagnostic.
8513  ///
8514  /// \param UPPC The context in which we are diagnosing unexpanded
8515  /// parameter packs.
8516  ///
8517  /// \param Unexpanded the set of unexpanded parameter packs.
8518  ///
8519  /// \returns true if an error occurred, false otherwise.
8523 
8524  /// If the given type contains an unexpanded parameter pack,
8525  /// diagnose the error.
8526  ///
8527  /// \param Loc The source location where a diagnostc should be emitted.
8528  ///
8529  /// \param T The type that is being checked for unexpanded parameter
8530  /// packs.
8531  ///
8532  /// \returns true if an error occurred, false otherwise.
8535 
8536  /// If the given expression contains an unexpanded parameter
8537  /// pack, diagnose the error.
8538  ///
8539  /// \param E The expression that is being checked for unexpanded
8540  /// parameter packs.
8541  ///
8542  /// \returns true if an error occurred, false otherwise.
8545 
8546  /// If the given requirees-expression contains an unexpanded reference to one
8547  /// of its own parameter packs, diagnose the error.
8548  ///
8549  /// \param RE The requiress-expression that is being checked for unexpanded
8550  /// parameter packs.
8551  ///
8552  /// \returns true if an error occurred, false otherwise.
8554 
8555  /// If the given nested-name-specifier contains an unexpanded
8556  /// parameter pack, diagnose the error.
8557  ///
8558  /// \param SS The nested-name-specifier that is being checked for
8559  /// unexpanded parameter packs.
8560  ///
8561  /// \returns true if an error occurred, false otherwise.
8564 
8565  /// If the given name contains an unexpanded parameter pack,
8566  /// diagnose the error.
8567  ///
8568  /// \param NameInfo The name (with source location information) that
8569  /// is being checked for unexpanded parameter packs.
8570  ///
8571  /// \returns true if an error occurred, false otherwise.
8574 
8575  /// If the given template name contains an unexpanded parameter pack,
8576  /// diagnose the error.
8577  ///
8578  /// \param Loc The location of the template name.
8579  ///
8580  /// \param Template The template name that is being checked for unexpanded
8581  /// parameter packs.
8582  ///
8583  /// \returns true if an error occurred, false otherwise.
8585  TemplateName Template,
8587 
8588  /// If the given template argument contains an unexpanded parameter
8589  /// pack, diagnose the error.
8590  ///
8591  /// \param Arg The template argument that is being checked for unexpanded
8592  /// parameter packs.
8593  ///
8594  /// \returns true if an error occurred, false otherwise.
8597 
8598  /// Collect the set of unexpanded parameter packs within the given
8599  /// template argument.
8600  ///
8601  /// \param Arg The template argument that will be traversed to find
8602  /// unexpanded parameter packs.
8605 
8606  /// Collect the set of unexpanded parameter packs within the given
8607  /// template argument.
8608  ///
8609  /// \param Arg The template argument that will be traversed to find
8610  /// unexpanded parameter packs.
8613 
8614  /// Collect the set of unexpanded parameter packs within the given
8615  /// type.
8616  ///
8617  /// \param T The type that will be traversed to find
8618  /// unexpanded parameter packs.
8621 
8622  /// Collect the set of unexpanded parameter packs within the given
8623  /// type.
8624  ///
8625  /// \param TL The type that will be traversed to find
8626  /// unexpanded parameter packs.
8629 
8630  /// Collect the set of unexpanded parameter packs within the given
8631  /// nested-name-specifier.
8632  ///
8633  /// \param NNS The nested-name-specifier that will be traversed to find
8634  /// unexpanded parameter packs.
8637 
8638  /// Collect the set of unexpanded parameter packs within the given
8639  /// name.
8640  ///
8641  /// \param NameInfo The name that will be traversed to find
8642  /// unexpanded parameter packs.
8645 
8646  /// Invoked when parsing a template argument followed by an
8647  /// ellipsis, which creates a pack expansion.
8648  ///
8649  /// \param Arg The template argument preceding the ellipsis, which
8650  /// may already be invalid.
8651  ///
8652  /// \param EllipsisLoc The location of the ellipsis.
8654  SourceLocation EllipsisLoc);
8655 
8656  /// Invoked when parsing a type followed by an ellipsis, which
8657  /// creates a pack expansion.
8658  ///
8659  /// \param Type The type preceding the ellipsis, which will become
8660  /// the pattern of the pack expansion.
8661  ///
8662  /// \param EllipsisLoc The location of the ellipsis.
8664 
8665  /// Construct a pack expansion type from the pattern of the pack
8666  /// expansion.
8668  SourceLocation EllipsisLoc,
8669  Optional<unsigned> NumExpansions);
8670 
8671  /// Construct a pack expansion type from the pattern of the pack
8672  /// expansion.
8674  SourceRange PatternRange,
8675  SourceLocation EllipsisLoc,
8676  Optional<unsigned> NumExpansions);
8677 
8678  /// Invoked when parsing an expression followed by an ellipsis, which
8679  /// creates a pack expansion.
8680  ///
8681  /// \param Pattern The expression preceding the ellipsis, which will become
8682  /// the pattern of the pack expansion.
8683  ///
8684  /// \param EllipsisLoc The location of the ellipsis.
8685  ExprResult ActOnPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc);
8686 
8687  /// Invoked when parsing an expression followed by an ellipsis, which
8688  /// creates a pack expansion.
8689  ///
8690  /// \param Pattern The expression preceding the ellipsis, which will become
8691  /// the pattern of the pack expansion.
8692  ///
8693  /// \param EllipsisLoc The location of the ellipsis.
8694  ExprResult CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc,
8695  Optional<unsigned> NumExpansions);
8696 
8697  /// Determine whether we could expand a pack expansion with the
8698  /// given set of parameter packs into separate arguments by repeatedly
8699  /// transforming the pattern.
8700  ///
8701  /// \param EllipsisLoc The location of the ellipsis that identifies the
8702  /// pack expansion.
8703  ///
8704  /// \param PatternRange The source range that covers the entire pattern of
8705  /// the pack expansion.
8706  ///
8707  /// \param Unexpanded The set of unexpanded parameter packs within the
8708  /// pattern.
8709  ///
8710  /// \param ShouldExpand Will be set to \c true if the transformer should
8711  /// expand the corresponding pack expansions into separate arguments. When
8712  /// set, \c NumExpansions must also be set.
8713  ///
8714  /// \param RetainExpansion Whether the caller should add an unexpanded
8715  /// pack expansion after all of the expanded arguments. This is used
8716  /// when extending explicitly-specified template argument packs per
8717  /// C++0x [temp.arg.explicit]p9.
8718  ///
8719  /// \param NumExpansions The number of separate arguments that will be in
8720  /// the expanded form of the corresponding pack expansion. This is both an
8721  /// input and an output parameter, which can be set by the caller if the
8722  /// number of expansions is known a priori (e.g., due to a prior substitution)
8723  /// and will be set by the callee when the number of expansions is known.
8724  /// The callee must set this value when \c ShouldExpand is \c true; it may
8725  /// set this value in other cases.
8726  ///
8727  /// \returns true if an error occurred (e.g., because the parameter packs
8728  /// are to be instantiated with arguments of different lengths), false
8729  /// otherwise. If false, \c ShouldExpand (and possibly \c NumExpansions)
8730  /// must be set.
8732  SourceRange PatternRange,
8734  const MultiLevelTemplateArgumentList &TemplateArgs,
8735  bool &ShouldExpand,
8736  bool &RetainExpansion,
8737  Optional<unsigned> &NumExpansions);
8738 
8739  /// Determine the number of arguments in the given pack expansion
8740  /// type.
8741  ///
8742  /// This routine assumes that the number of arguments in the expansion is
8743  /// consistent across all of the unexpanded parameter packs in its pattern.
8744  ///
8745  /// Returns an empty Optional if the type can't be expanded.
8747  const MultiLevelTemplateArgumentList &TemplateArgs);
8748 
8749  /// Determine whether the given declarator contains any unexpanded
8750  /// parameter packs.
8751  ///
8752  /// This routine is used by the parser to disambiguate function declarators
8753  /// with an ellipsis prior to the ')', e.g.,
8754  ///
8755  /// \code
8756  /// void f(T...);
8757  /// \endcode
8758  ///
8759  /// To determine whether we have an (unnamed) function parameter pack or
8760  /// a variadic function.
8761  ///
8762  /// \returns true if the declarator contains any unexpanded parameter packs,
8763  /// false otherwise.
8765 
8766  /// Returns the pattern of the pack expansion for a template argument.
8767  ///
8768  /// \param OrigLoc The template argument to expand.
8769  ///
8770  /// \param Ellipsis Will be set to the location of the ellipsis.
8771  ///
8772  /// \param NumExpansions Will be set to the number of expansions that will
8773  /// be generated from this pack expansion, if known a priori.
8775  TemplateArgumentLoc OrigLoc,
8776  SourceLocation &Ellipsis,
8777  Optional<unsigned> &NumExpansions) const;
8778 
8779  /// Given a template argument that contains an unexpanded parameter pack, but
8780  /// which has already been substituted, attempt to determine the number of
8781  /// elements that will be produced once this argument is fully-expanded.
8782  ///
8783  /// This is intended for use when transforming 'sizeof...(Arg)' in order to
8784  /// avoid actually expanding the pack where possible.
8786 
8787  //===--------------------------------------------------------------------===//
8788  // C++ Template Argument Deduction (C++ [temp.deduct])
8789  //===--------------------------------------------------------------------===//
8790 
8791  /// Adjust the type \p ArgFunctionType to match the calling convention,
8792  /// noreturn, and optionally the exception specification of \p FunctionType.
8793  /// Deduction often wants to ignore these properties when matching function
8794  /// types.
8796  bool AdjustExceptionSpec = false);
8797 
8798  /// Describes the result of template argument deduction.
8799  ///
8800  /// The TemplateDeductionResult enumeration describes the result of
8801  /// template argument deduction, as returned from
8802  /// DeduceTemplateArguments(). The separate TemplateDeductionInfo
8803  /// structure provides additional information about the results of
8804  /// template argument deduction, e.g., the deduced template argument
8805  /// list (if successful) or the specific template parameters or
8806  /// deduced arguments that were involved in the failure.
8808  /// Template argument deduction was successful.
8810  /// The declaration was invalid; do nothing.
8812  /// Template argument deduction exceeded the maximum template
8813  /// instantiation depth (which has already been diagnosed).
8815  /// Template argument deduction did not deduce a value
8816  /// for every template parameter.
8818  /// Template argument deduction did not deduce a value for every
8819  /// expansion of an expanded template parameter pack.
8821  /// Template argument deduction produced inconsistent
8822  /// deduced values for the given template parameter.
8824  /// Template argument deduction failed due to inconsistent
8825  /// cv-qualifiers on a template parameter type that would
8826  /// otherwise be deduced, e.g., we tried to deduce T in "const T"
8827  /// but were given a non-const "X".
8829  /// Substitution of the deduced template argument values
8830  /// resulted in an error.
8832  /// After substituting deduced template arguments, a dependent
8833  /// parameter type did not match the corresponding argument.
8835  /// After substituting deduced template arguments, an element of
8836  /// a dependent parameter type did not match the corresponding element
8837  /// of the corresponding argument (when deducing from an initializer list).
8839  /// A non-depnedent component of the parameter did not match the
8840  /// corresponding component of the argument.
8842  /// When performing template argument deduction for a function
8843  /// template, there were too many call arguments.
8845  /// When performing template argument deduction for a function
8846  /// template, there were too few call arguments.
8848  /// The explicitly-specified template arguments were not valid
8849  /// template arguments for the given template.
8851  /// Checking non-dependent argument conversions failed.
8853  /// The deduced arguments did not satisfy the constraints associated
8854  /// with the template.
8856  /// Deduction failed; that's all we know.
8858  /// CUDA Target attributes do not match.
8860  };
8861 
8864  const TemplateArgumentList &TemplateArgs,
8866 
8869  const TemplateArgumentList &TemplateArgs,
8871 
8873  FunctionTemplateDecl *FunctionTemplate,
8874  TemplateArgumentListInfo &ExplicitTemplateArgs,
8878 
8879  /// brief A function argument from which we performed template argument
8880  // deduction for a call.
8883  unsigned ArgIdx, QualType OriginalArgType)
8887 
8890  unsigned ArgIdx;
8892  };
8893 
8895  FunctionTemplateDecl *FunctionTemplate,
8897  unsigned NumExplicitlySpecified, FunctionDecl *&Specialization,
8899  SmallVectorImpl<OriginalCallArg> const *OriginalCallArgs = nullptr,
8900  bool PartialOverloading = false,
8901  llvm::function_ref<bool()> CheckNonDependent = []{ return false; });
8902 
8904  FunctionTemplateDecl *FunctionTemplate,
8905  TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef<Expr *> Args,
8906  FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info,
8907  bool PartialOverloading,
8908  llvm::function_ref<bool(ArrayRef<QualType>)> CheckNonDependent);
8909 
8912  TemplateArgumentListInfo *ExplicitTemplateArgs,
8913  QualType ArgFunctionType,
8914  FunctionDecl *&Specialization,
8916  bool IsAddressOfFunction = false);
8917 
8920  QualType ToType,
8921  CXXConversionDecl *&Specialization,
8923 
8926  TemplateArgumentListInfo *ExplicitTemplateArgs,
8927  FunctionDecl *&Specialization,
8929  bool IsAddressOfFunction = false);
8930 
8931  /// Substitute Replacement for \p auto in \p TypeWithAuto
8932  QualType SubstAutoType(QualType TypeWithAuto, QualType Replacement);
8933  /// Substitute Replacement for auto in TypeWithAuto
8935  QualType Replacement);
8936 
8937  // Substitute auto in TypeWithAuto for a Dependent auto type
8939 
8940  // Substitute auto in TypeWithAuto for a Dependent auto type
8941  TypeSourceInfo *
8943 
8944  /// Completely replace the \c auto in \p TypeWithAuto by
8945  /// \p Replacement. This does not retain any \c auto type sugar.
8946  QualType ReplaceAutoType(QualType TypeWithAuto, QualType Replacement);
8948  QualType Replacement);
8949 
8950  /// Result type of DeduceAutoType.
8955  };
8956 
8958  DeduceAutoType(TypeSourceInfo *AutoType, Expr *&Initializer, QualType &Result,
8959  Optional<unsigned> DependentDeductionDepth = None,
8960  bool IgnoreConstraints = false);
8962  DeduceAutoType(TypeLoc AutoTypeLoc, Expr *&Initializer, QualType &Result,
8963  Optional<unsigned> DependentDeductionDepth = None,
8964  bool IgnoreConstraints = false);
8965  void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init);
8967  bool Diagnose = true);
8968 
8969  /// Declare implicit deduction guides for a class template if we've
8970  /// not already done so.
8972  SourceLocation Loc);
8973 
8975  TypeSourceInfo *TInfo, const InitializedEntity &Entity,
8976  const InitializationKind &Kind, MultiExprArg Init);
8977 
8980  SourceRange Range, bool DirectInit,
8981  Expr *Init);
8982 
8984 
8986  SourceLocation ReturnLoc,
8987  Expr *&RetExpr, const AutoType *AT);
8988 
8991  TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1,
8992  unsigned NumCallArguments2, bool Reversed = false);
8995  TemplateSpecCandidateSet &FailedCandidates,
8996  SourceLocation Loc,
8997  const PartialDiagnostic &NoneDiag,
8998  const PartialDiagnostic &AmbigDiag,
8999  const PartialDiagnostic &CandidateDiag,
9000  bool Complain = true, QualType TargetType = QualType());
9001 
9006  SourceLocation Loc);
9007 
9010 
9014 
9017 
9019  TemplateParameterList *PParam, TemplateDecl *AArg, SourceLocation Loc);
9020 
9021  void MarkUsedTemplateParameters(const Expr *E, bool OnlyDeduced,
9022  unsigned Depth, llvm::SmallBitVector &Used);
9023 
9024  void MarkUsedTemplateParameters(const TemplateArgumentList &TemplateArgs,
9025  bool OnlyDeduced,
9026  unsigned Depth,
9027  llvm::SmallBitVector &Used);
9029  const FunctionTemplateDecl *FunctionTemplate,
9030  llvm::SmallBitVector &Deduced) {
9031  return MarkDeducedTemplateParameters(Context, FunctionTemplate, Deduced);
9032  }
9033  static void MarkDeducedTemplateParameters(ASTContext &Ctx,
9034  const FunctionTemplateDecl *FunctionTemplate,
9035  llvm::SmallBitVector &Deduced);
9036 
9037  //===--------------------------------------------------------------------===//
9038  // C++ Template Instantiation
9039  //
9040 
9042  const NamedDecl *D, const TemplateArgumentList *Innermost = nullptr,
9043  bool RelativeToPrimary = false, const FunctionDecl *Pattern = nullptr);
9044 
9045  /// A context in which code is being synthesized (where a source location
9046  /// alone is not sufficient to identify the context). This covers template
9047  /// instantiation and various forms of implicitly-generated functions.
9049  /// The kind of template instantiation we are performing
9051  /// We are instantiating a template declaration. The entity is
9052  /// the declaration we're instantiating (e.g., a CXXRecordDecl).
9054 
9055  /// We are instantiating a default argument for a template
9056  /// parameter. The Entity is the template parameter whose argument is
9057  /// being instantiated, the Template is the template, and the
9058  /// TemplateArgs/NumTemplateArguments provide the template arguments as
9059  /// specified.
9061 
9062  /// We are instantiating a default argument for a function.
9063  /// The Entity is the ParmVarDecl, and TemplateArgs/NumTemplateArgs
9064  /// provides the template arguments as specified.
9066 
9067  /// We are substituting explicit template arguments provided for
9068  /// a function template. The entity is a FunctionTemplateDecl.
9070 
9071  /// We are substituting template argument determined as part of
9072  /// template argument deduction for either a class template
9073  /// partial specialization or a function template. The
9074  /// Entity is either a {Class|Var}TemplatePartialSpecializationDecl or
9075  /// a TemplateDecl.
9077 
9078  /// We are substituting prior template arguments into a new
9079  /// template parameter. The template parameter itself is either a
9080  /// NonTypeTemplateParmDecl or a TemplateTemplateParmDecl.
9082 
9083  /// We are checking the validity of a default template argument that
9084  /// has been used when naming a template-id.
9086 
9087  /// We are computing the exception specification for a defaulted special
9088  /// member function.
9090 
9091  /// We are instantiating the exception specification for a function
9092  /// template which was deferred until it was needed.
9094 
9095  /// We are instantiating a requirement of a requires expression.
9097 
9098  /// We are checking the satisfaction of a nested requirement of a requires
9099  /// expression.
9101 
9102  /// We are declaring an implicit special member function.
9104 
9105  /// We are declaring an implicit 'operator==' for a defaulted
9106  /// 'operator<=>'.
9108 
9109  /// We are defining a synthesized function (such as a defaulted special
9110  /// member).
9112 
9113  // We are checking the constraints associated with a constrained entity or
9114  // the constraint expression of a concept. This includes the checks that
9115  // atomic constraints have the type 'bool' and that they can be constant
9116  // evaluated.
9118 
9119  // We are substituting template arguments into a constraint expression.
9121 
9122  // We are normalizing a constraint expression.
9124 
9125  // We are substituting into the parameter mapping of an atomic constraint
9126  // during normalization.
9128 
9129  /// We are rewriting a comparison operator in terms of an operator<=>.
9131 
9132  /// We are initializing a structured binding.
9134 
9135  /// We are marking a class as __dllexport.
9137 
9138  /// Added for Template instantiation observation.
9139  /// Memoization means we are _not_ instantiating a template because
9140  /// it is already instantiated (but we entered a context where we
9141  /// would have had to if it was not already instantiated).
9143  } Kind;
9144 
9145  /// Was the enclosing context a non-instantiation SFINAE context?
9147 
9148  /// The point of instantiation or synthesis within the source code.
9150 
9151  /// The entity that is being synthesized.
9153 
9154  /// The template (or partial specialization) in which we are
9155  /// performing the instantiation, for substitutions of prior template
9156  /// arguments.
9158 
9159  /// The list of template arguments we are substituting, if they
9160  /// are not part of the entity.
9162 
9163  // FIXME: Wrap this union around more members, or perhaps store the
9164  // kind-specific members in the RAII object owning the context.
9165  union {
9166  /// The number of template arguments in TemplateArgs.
9168 
9169  /// The special member being declared or defined.
9171  };
9172 
9174  assert(Kind != DeclaringSpecialMember);
9175  return {TemplateArgs, NumTemplateArgs};
9176  }
9177 
9178  /// The template deduction info object associated with the
9179  /// substitution or checking of explicit or deduced template arguments.
9181 
9182  /// The source range that covers the construct that cause
9183  /// the instantiation, e.g., the template-id that causes a class
9184  /// template instantiation.
9186 
9190  Template(nullptr), TemplateArgs(nullptr), NumTemplateArgs(0),
9191  DeductionInfo(nullptr) {}
9192 
9193  /// Determines whether this template is an actual instantiation
9194  /// that should be counted toward the maximum instantiation depth.
9195  bool isInstantiationRecord() const;
9196  };
9197 
9198  /// List of active code synthesis contexts.
9199  ///
9200  /// This vector is treated as a stack. As synthesis of one entity requires
9201  /// synthesis of another, additional contexts are pushed onto the stack.
9203 
9204  /// Specializations whose definitions are currently being instantiated.
9206 
9207  /// Non-dependent types used in templates that have already been instantiated
9208  /// by some template instantiation.
9210 
9211  /// Extra modules inspected when performing a lookup during a template
9212  /// instantiation. Computed lazily.
9214 
9215  /// Cache of additional modules that should be used for name lookup
9216  /// within the current template instantiation. Computed lazily; use
9217  /// getLookupModules() to get a complete set.
9219 
9220  /// Get the set of additional modules that should be checked during
9221  /// name lookup. A module and its imports become visible when instanting a
9222  /// template defined within it.
9224 
9225  /// Map from the most recent declaration of a namespace to the most
9226  /// recent visible declaration of that namespace.
9227  llvm::DenseMap<NamedDecl*, NamedDecl*> VisibleNamespaceCache;
9228 
9229  /// Whether we are in a SFINAE context that is not associated with
9230  /// template instantiation.
9231  ///
9232  /// This is used when setting up a SFINAE trap (\c see SFINAETrap) outside
9233  /// of a template instantiation or template argument deduction.
9235 
9236  /// The number of \p CodeSynthesisContexts that are not template
9237  /// instantiations and, therefore, should not be counted as part of the
9238  /// instantiation depth.
9239  ///
9240  /// When the instantiation depth reaches the user-configurable limit
9241  /// \p LangOptions::InstantiationDepth we will abort instantiation.
9242  // FIXME: Should we have a similar limit for other forms of synthesis?
9244 
9245  /// The depth of the context stack at the point when the most recent
9246  /// error or warning was produced.
9247  ///
9248  /// This value is used to suppress printing of redundant context stacks
9249  /// when there are multiple errors or warnings in the same instantiation.
9250  // FIXME: Does this belong in Sema? It's tough to implement it anywhere else.
9252 
9253  /// The template instantiation callbacks to trace or track
9254  /// instantiations (objects can be chained).
9255  ///
9256  /// This callbacks is used to print, trace or track template
9257  /// instantiations as they are being constructed.
9258  std::vector<std::unique_ptr<TemplateInstantiationCallback>>
9260 
9261  /// The current index into pack expansion arguments that will be
9262  /// used for substitution of parameter packs.
9263  ///
9264  /// The pack expansion index will be -1 to indicate that parameter packs
9265  /// should be instantiated as themselves. Otherwise, the index specifies
9266  /// which argument within the parameter pack will be used for substitution.
9268 
9269  /// RAII object used to change the argument pack substitution index
9270  /// within a \c Sema object.
9271  ///
9272  /// See \c ArgumentPackSubstitutionIndex for more information.
9274  Sema &Self;
9275  int OldSubstitutionIndex;
9276 
9277  public:
9278  ArgumentPackSubstitutionIndexRAII(Sema &Self, int NewSubstitutionIndex)
9279  : Self(Self), OldSubstitutionIndex(Self.ArgumentPackSubstitutionIndex) {
9280  Self.ArgumentPackSubstitutionIndex = NewSubstitutionIndex;
9281  }
9282 
9284  Self.ArgumentPackSubstitutionIndex = OldSubstitutionIndex;
9285  }
9286  };
9287 
9289 
9290  /// For each declaration that involved template argument deduction, the
9291  /// set of diagnostics that were suppressed during that template argument
9292  /// deduction.
9293  ///
9294  /// FIXME: Serialize this structure to the AST file.
9295  typedef llvm::DenseMap<Decl *, SmallVector<PartialDiagnosticAt, 1> >
9298 
9299  /// A stack object to be created when performing template
9300  /// instantiation.
9301  ///
9302  /// Construction of an object of type \c InstantiatingTemplate
9303  /// pushes the current instantiation onto the stack of active
9304  /// instantiations. If the size of this stack exceeds the maximum
9305  /// number of recursive template instantiations, construction
9306  /// produces an error and evaluates true.
9307  ///
9308  /// Destruction of this object will pop the named instantiation off
9309  /// the stack.
9311  /// Note that we are instantiating a class template,
9312  /// function template, variable template, alias template,
9313  /// or a member thereof.
9314  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9315  Decl *Entity,
9316  SourceRange InstantiationRange = SourceRange());
9317 
9319  /// Note that we are instantiating an exception specification
9320  /// of a function template.
9321  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9323  SourceRange InstantiationRange = SourceRange());
9324 
9325  /// Note that we are instantiating a default argument in a
9326  /// template-id.
9327  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9328  TemplateParameter Param, TemplateDecl *Template,
9329  ArrayRef<TemplateArgument> TemplateArgs,
9330  SourceRange InstantiationRange = SourceRange());
9331 
9332  /// Note that we are substituting either explicitly-specified or
9333  /// deduced template arguments during function template argument deduction.
9334  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9335  FunctionTemplateDecl *FunctionTemplate,
9336  ArrayRef<TemplateArgument> TemplateArgs,
9338  sema::TemplateDeductionInfo &DeductionInfo,
9339  SourceRange InstantiationRange = SourceRange());
9340 
9341  /// Note that we are instantiating as part of template
9342  /// argument deduction for a class template declaration.
9343  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9344  TemplateDecl *Template,
9345  ArrayRef<TemplateArgument> TemplateArgs,
9346  sema::TemplateDeductionInfo &DeductionInfo,
9347  SourceRange InstantiationRange = SourceRange());
9348 
9349  /// Note that we are instantiating as part of template
9350  /// argument deduction for a class template partial
9351  /// specialization.
9352  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9354  ArrayRef<TemplateArgument> TemplateArgs,
9355  sema::TemplateDeductionInfo &DeductionInfo,
9356  SourceRange InstantiationRange = SourceRange());
9357 
9358  /// Note that we are instantiating as part of template
9359  /// argument deduction for a variable template partial
9360  /// specialization.
9361  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9363  ArrayRef<TemplateArgument> TemplateArgs,
9364  sema::TemplateDeductionInfo &DeductionInfo,
9365  SourceRange InstantiationRange = SourceRange());
9366 
9367  /// Note that we are instantiating a default argument for a function
9368  /// parameter.
9369  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9370  ParmVarDecl *Param,
9371  ArrayRef<TemplateArgument> TemplateArgs,
9372  SourceRange InstantiationRange = SourceRange());
9373 
9374  /// Note that we are substituting prior template arguments into a
9375  /// non-type parameter.
9376  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9377  NamedDecl *Template,
9378  NonTypeTemplateParmDecl *Param,
9379  ArrayRef<TemplateArgument> TemplateArgs,
9380  SourceRange InstantiationRange);
9381 
9382  /// Note that we are substituting prior template arguments into a
9383  /// template template parameter.
9384  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9385  NamedDecl *Template,
9386  TemplateTemplateParmDecl *Param,
9387  ArrayRef<TemplateArgument> TemplateArgs,
9388  SourceRange InstantiationRange);
9389 
9390  /// Note that we are checking the default template argument
9391  /// against the template parameter for a given template-id.
9392  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9393  TemplateDecl *Template,
9394  NamedDecl *Param,
9395  ArrayRef<TemplateArgument> TemplateArgs,
9396  SourceRange InstantiationRange);
9397 
9398  struct ConstraintsCheck {};
9399  /// \brief Note that we are checking the constraints associated with some
9400  /// constrained entity (a concept declaration or a template with associated
9401  /// constraints).
9402  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9403  ConstraintsCheck, NamedDecl *Template,
9404  ArrayRef<TemplateArgument> TemplateArgs,
9405  SourceRange InstantiationRange);
9406 
9408  /// \brief Note that we are checking a constraint expression associated
9409  /// with a template declaration or as part of the satisfaction check of a
9410  /// concept.
9411  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9412  ConstraintSubstitution, NamedDecl *Template,
9413  sema::TemplateDeductionInfo &DeductionInfo,
9414  SourceRange InstantiationRange);
9415 
9417  /// \brief Note that we are normalizing a constraint expression.
9418  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9420  SourceRange InstantiationRange);
9421 
9423  /// \brief Note that we are subtituting into the parameter mapping of an
9424  /// atomic constraint during constraint normalization.
9425  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9427  SourceRange InstantiationRange);
9428 
9429  /// \brief Note that we are substituting template arguments into a part of
9430  /// a requirement of a requires expression.
9431  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9432  concepts::Requirement *Req,
9433  sema::TemplateDeductionInfo &DeductionInfo,
9434  SourceRange InstantiationRange = SourceRange());
9435 
9436  /// \brief Note that we are checking the satisfaction of the constraint
9437  /// expression inside of a nested requirement.
9438  InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation,
9440  SourceRange InstantiationRange = SourceRange());
9441 
9442  /// Note that we have finished instantiating this template.
9443  void Clear();
9444 
9446 
9447  /// Determines whether we have exceeded the maximum
9448  /// recursive template instantiations.
9449  bool isInvalid() const { return Invalid; }
9450 
9451  /// Determine whether we are already instantiating this
9452  /// specialization in some surrounding active instantiation.
9453  bool isAlreadyInstantiating() const { return AlreadyInstantiating; }
9454 
9455  private:
9456  Sema &SemaRef;
9457  bool Invalid;
9458  bool AlreadyInstantiating;
9459  bool CheckInstantiationDepth(SourceLocation PointOfInstantiation,
9460  SourceRange InstantiationRange);
9461 
9464  SourceLocation PointOfInstantiation, SourceRange InstantiationRange,
9465  Decl *Entity, NamedDecl *Template = nullptr,
9466  ArrayRef<TemplateArgument> TemplateArgs = None,
9467  sema::TemplateDeductionInfo *DeductionInfo = nullptr);
9468 
9470 
9472  operator=(const InstantiatingTemplate&) = delete;
9473  };
9474 
9475  void pushCodeSynthesisContext(CodeSynthesisContext Ctx);
9476  void popCodeSynthesisContext();
9477 
9478  /// Determine whether we are currently performing template instantiation.
9481  }
9482 
9484  if (!CodeSynthesisContexts.empty() &&
9488  }
9491  }
9492  void PrintInstantiationStack();
9493 
9495 
9496  /// Determines whether we are currently in a context where
9497  /// template argument substitution failures are not considered
9498  /// errors.
9499  ///
9500  /// \returns An empty \c Optional if we're not in a SFINAE context.
9501  /// Otherwise, contains a pointer that, if non-NULL, contains the nearest
9502  /// template-deduction context object, which can be used to capture
9503  /// diagnostics that will be suppressed.
9505 
9506  /// Determines whether we are currently in a context that
9507  /// is not evaluated as per C++ [expr] p5.
9508  bool isUnevaluatedContext() const {
9509  assert(!ExprEvalContexts.empty() &&
9510  "Must be in an expression evaluation context");
9511  return ExprEvalContexts.back().isUnevaluated();
9512  }
9513 
9515  assert(!ExprEvalContexts.empty() &&
9516  "Must be in an expression evaluation context");
9517  return ExprEvalContexts.back().isImmediateFunctionContext();
9518  }
9519 
9520  /// RAII class used to determine whether SFINAE has
9521  /// trapped any errors that occur during template argument
9522  /// deduction.
9523  class SFINAETrap {
9524  Sema &SemaRef;
9525  unsigned PrevSFINAEErrors;
9526  bool PrevInNonInstantiationSFINAEContext;
9527  bool PrevAccessCheckingSFINAE;
9528  bool PrevLastDiagnosticIgnored;
9529 
9530  public:
9531  explicit SFINAETrap(Sema &SemaRef, bool AccessCheckingSFINAE = false)
9532  : SemaRef(SemaRef), PrevSFINAEErrors(SemaRef.NumSFINAEErrors),
9533  PrevInNonInstantiationSFINAEContext(
9535  PrevAccessCheckingSFINAE(SemaRef.AccessCheckingSFINAE),
9536  PrevLastDiagnosticIgnored(
9537  SemaRef.getDiagnostics().isLastDiagnosticIgnored())
9538  {
9539  if (!SemaRef.isSFINAEContext())
9540  SemaRef.InNonInstantiationSFINAEContext = true;
9542  }
9543 
9545  SemaRef.NumSFINAEErrors = PrevSFINAEErrors;
9547  = PrevInNonInstantiationSFINAEContext;
9548  SemaRef.AccessCheckingSFINAE = PrevAccessCheckingSFINAE;
9550  PrevLastDiagnosticIgnored);
9551  }
9552 
9553  /// Determine whether any SFINAE errors have been trapped.
9554  bool hasErrorOccurred() const {
9555  return SemaRef.NumSFINAEErrors > PrevSFINAEErrors;
9556  }
9557  };
9558 
9559  /// RAII class used to indicate that we are performing provisional
9560  /// semantic analysis to determine the validity of a construct, so
9561  /// typo-correction and diagnostics in the immediate context (not within
9562  /// implicitly-instantiated templates) should be suppressed.
9564  Sema &SemaRef;
9565  // FIXME: Using a SFINAETrap for this is a hack.
9566  SFINAETrap Trap;
9567  bool PrevDisableTypoCorrection;
9568  public:
9569  explicit TentativeAnalysisScope(Sema &SemaRef)
9570  : SemaRef(SemaRef), Trap(SemaRef, true),
9571  PrevDisableTypoCorrection(SemaRef.DisableTypoCorrection) {
9572  SemaRef.DisableTypoCorrection = true;
9573  }
9575  SemaRef.DisableTypoCorrection = PrevDisableTypoCorrection;
9576  }
9577  };
9578 
9579  /// The current instantiation scope used to store local
9580  /// variables.
9582 
9583  /// Tracks whether we are in a context where typo correction is
9584  /// disabled.
9586 
9587  /// The number of typos corrected by CorrectTypo.
9588  unsigned TyposCorrected;
9589 
9590  typedef llvm::SmallSet<SourceLocation, 2> SrcLocSet;
9591  typedef llvm::DenseMap<IdentifierInfo *, SrcLocSet> IdentifierSourceLocations;
9592 
9593  /// A cache containing identifiers for which typo correction failed and
9594  /// their locations, so that repeated attempts to correct an identifier in a
9595  /// given location are ignored if typo correction already failed for it.
9597 
9598  /// Worker object for performing CFG-based warnings.
9601 
9602  /// An entity for which implicit template instantiation is required.
9603  ///
9604  /// The source location associated with the declaration is the first place in
9605  /// the source code where the declaration was "used". It is not necessarily
9606  /// the point of instantiation (which will be either before or after the
9607  /// namespace-scope declaration that triggered this implicit instantiation),
9608  /// However, it is the location that diagnostics should generally refer to,
9609  /// because users will need to know what code triggered the instantiation.
9610  typedef std::pair<ValueDecl *, SourceLocation> PendingImplicitInstantiation;
9611 
9612  /// The queue of implicit template instantiations that are required
9613  /// but have not yet been performed.
9614  std::deque<PendingImplicitInstantiation> PendingInstantiations;
9615 
9616  /// Queue of implicit template instantiations that cannot be performed
9617  /// eagerly.
9619 
9621  public:
9623  : S(S), Enabled(Enabled) {
9624  if (!Enabled) return;
9625 
9626  SavedPendingInstantiations.swap(S.PendingInstantiations);
9627  SavedVTableUses.swap(S.VTableUses);
9628  }
9629 
9630  void perform() {
9631  if (Enabled) {
9632  S.DefineUsedVTables();
9633  S.PerformPendingInstantiations();
9634  }
9635  }
9636 
9638  if (!Enabled) return;
9639 
9640  // Restore the set of pending vtables.
9641  assert(S.VTableUses.empty() &&
9642  "VTableUses should be empty before it is discarded.");
9643  S.VTableUses.swap(SavedVTableUses);
9644 
9645  // Restore the set of pending implicit instantiations.
9646  if (S.TUKind != TU_Prefix || !S.LangOpts.PCHInstantiateTemplates) {
9647  assert(S.PendingInstantiations.empty() &&
9648  "PendingInstantiations should be empty before it is discarded.");
9649  S.PendingInstantiations.swap(SavedPendingInstantiations);
9650  } else {
9651  // Template instantiations in the PCH may be delayed until the TU.
9652  S.PendingInstantiations.swap(SavedPendingInstantiations);
9653  S.PendingInstantiations.insert(S.PendingInstantiations.end(),
9654  SavedPendingInstantiations.begin(),
9655  SavedPendingInstantiations.end());
9656  }
9657  }
9658 
9659  private:
9660  Sema &S;
9661  SmallVector<VTableUse, 16> SavedVTableUses;
9662  std::deque<PendingImplicitInstantiation> SavedPendingInstantiations;
9663  bool Enabled;
9664  };
9665 
9666  /// The queue of implicit template instantiations that are required
9667  /// and must be performed within the current local scope.
9668  ///
9669  /// This queue is only used for member functions of local classes in
9670  /// templates, which must be instantiated in the same scope as their
9671  /// enclosing function, so that they can reference function-local
9672  /// types, static variables, enumerators, etc.
9673  std::deque<PendingImplicitInstantiation> PendingLocalImplicitInstantiations;
9674 
9676  public:
9678  SavedPendingLocalImplicitInstantiations.swap(
9679  S.PendingLocalImplicitInstantiations);
9680  }
9681 
9682  void perform() { S.PerformPendingInstantiations(/*LocalOnly=*/true); }
9683 
9685  assert(S.PendingLocalImplicitInstantiations.empty() &&
9686  "there shouldn't be any pending local implicit instantiations");
9687  SavedPendingLocalImplicitInstantiations.swap(
9688  S.PendingLocalImplicitInstantiations);
9689  }
9690 
9691  private:
9692  Sema &S;
9693  std::deque<PendingImplicitInstantiation>
9694  SavedPendingLocalImplicitInstantiations;
9695  };
9696 
9697  /// A helper class for building up ExtParameterInfos.
9700  bool HasInteresting = false;
9701 
9702  public:
9703  /// Set the ExtParameterInfo for the parameter at the given index,
9704  ///
9705  void set(unsigned index, FunctionProtoType::ExtParameterInfo info) {
9706  assert(Infos.size() <= index);
9707  Infos.resize(index);
9708  Infos.push_back(info);
9709 
9710  if (!HasInteresting)
9711  HasInteresting = (info != FunctionProtoType::ExtParameterInfo());
9712  }
9713 
9714  /// Return a pointer (suitable for setting in an ExtProtoInfo) to the
9715  /// ExtParameterInfo array we've built up.
9717  getPointerOrNull(unsigned numParams) {
9718  if (!HasInteresting) return nullptr;
9719  Infos.resize(numParams);
9720  return Infos.data();
9721  }
9722  };
9723 
9724  void PerformPendingInstantiations(bool LocalOnly = false);
9725 
9727  const MultiLevelTemplateArgumentList &TemplateArgs,
9728  SourceLocation Loc, DeclarationName Entity,
9729  bool AllowDeducedTST = false);
9730 
9732  const MultiLevelTemplateArgumentList &TemplateArgs,
9733  SourceLocation Loc, DeclarationName Entity);
9734 
9736  const MultiLevelTemplateArgumentList &TemplateArgs,
9737  SourceLocation Loc, DeclarationName Entity);
9738 
9740  const MultiLevelTemplateArgumentList &TemplateArgs,
9741  SourceLocation Loc,
9742  DeclarationName Entity,
9743  CXXRecordDecl *ThisContext,
9744  Qualifiers ThisTypeQuals);
9745  void SubstExceptionSpec(FunctionDecl *New, const FunctionProtoType *Proto,
9746  const MultiLevelTemplateArgumentList &Args);
9749  SmallVectorImpl<QualType> &ExceptionStorage,
9750  const MultiLevelTemplateArgumentList &Args);
9752  const MultiLevelTemplateArgumentList &TemplateArgs,
9753  int indexAdjustment,
9754  Optional<unsigned> NumExpansions,
9755  bool ExpectParameterPack);
9757  const FunctionProtoType::ExtParameterInfo *ExtParamInfos,
9758  const MultiLevelTemplateArgumentList &TemplateArgs,
9759  SmallVectorImpl<QualType> &ParamTypes,
9760  SmallVectorImpl<ParmVarDecl *> *OutParams,
9761  ExtParameterInfoBuilder &ParamInfos);
9763  const MultiLevelTemplateArgumentList &TemplateArgs);
9764 
9765  /// Substitute the given template arguments into a list of
9766  /// expressions, expanding pack expansions if required.
9767  ///
9768  /// \param Exprs The list of expressions to substitute into.
9769  ///
9770  /// \param IsCall Whether this is some form of call, in which case
9771  /// default arguments will be dropped.
9772  ///
9773  /// \param TemplateArgs The set of template arguments to substitute.
9774  ///
9775  /// \param Outputs Will receive all of the substituted arguments.
9776  ///
9777  /// \returns true if an error occurred, false otherwise.
9778  bool SubstExprs(ArrayRef<Expr *> Exprs, bool IsCall,
9779  const MultiLevelTemplateArgumentList &TemplateArgs,
9780  SmallVectorImpl<Expr *> &Outputs);
9781 
9783  const MultiLevelTemplateArgumentList &TemplateArgs);
9784 
9787  const MultiLevelTemplateArgumentList &TemplateArgs);
9788 
9789  bool
9791  const MultiLevelTemplateArgumentList &TemplateArgs,
9792  TemplateArgumentListInfo &Outputs);
9793 
9794 
9795  Decl *SubstDecl(Decl *D, DeclContext *Owner,
9796  const MultiLevelTemplateArgumentList &TemplateArgs);
9797 
9798  /// Substitute the name and return type of a defaulted 'operator<=>' to form
9799  /// an implicit 'operator=='.
9802 
9804  const MultiLevelTemplateArgumentList &TemplateArgs,
9805  bool CXXDirectInit);
9806 
9807  bool
9808  SubstBaseSpecifiers(CXXRecordDecl *Instantiation,
9809  CXXRecordDecl *Pattern,
9810  const MultiLevelTemplateArgumentList &TemplateArgs);
9811 
9812  bool
9813  InstantiateClass(SourceLocation PointOfInstantiation,
9814  CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern,
9815  const MultiLevelTemplateArgumentList &TemplateArgs,
9817  bool Complain = true);
9818 
9819  bool InstantiateEnum(SourceLocation PointOfInstantiation,
9820  EnumDecl *Instantiation, EnumDecl *Pattern,
9821  const MultiLevelTemplateArgumentList &TemplateArgs,
9823 
9825  SourceLocation PointOfInstantiation, FieldDecl *Instantiation,
9826  FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs);
9827 
9829  const Attr *TmplAttr;
9832 
9834  Decl *D)
9835  : TmplAttr(A), Scope(S), NewDecl(D)
9836  { }
9837  };
9839 
9840  void InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs,
9841  const Decl *Pattern, Decl *Inst,
9842  LateInstantiatedAttrVec *LateAttrs = nullptr,
9843  LocalInstantiationScope *OuterMostScope = nullptr);
9844 
9845  void
9847  const Decl *Pattern, Decl *Inst,
9848  LateInstantiatedAttrVec *LateAttrs = nullptr,
9849  LocalInstantiationScope *OuterMostScope = nullptr);
9850 
9852 
9854  SourceLocation Loc, ClassTemplateSpecializationDecl *ClassTemplateSpec);
9855 
9856  bool
9858  ClassTemplateSpecializationDecl *ClassTemplateSpec,
9860  bool Complain = true);
9861 
9862  void InstantiateClassMembers(SourceLocation PointOfInstantiation,
9863  CXXRecordDecl *Instantiation,
9864  const MultiLevelTemplateArgumentList &TemplateArgs,
9866 
9868  SourceLocation PointOfInstantiation,
9869  ClassTemplateSpecializationDecl *ClassTemplateSpec,
9871 
9874  const MultiLevelTemplateArgumentList &TemplateArgs);
9875 
9878  const MultiLevelTemplateArgumentList &TemplateArgs);
9879  TemplateName
9881  SourceLocation Loc,
9882  const MultiLevelTemplateArgumentList &TemplateArgs);
9883 
9885  const MultiLevelTemplateArgumentList &TemplateArgs);
9886 
9888  ParmVarDecl *Param);
9889  void InstantiateExceptionSpec(SourceLocation PointOfInstantiation,
9890  FunctionDecl *Function);
9892  SourceLocation PointOfInstantiation, FunctionDecl *Decl,
9893  ArrayRef<TemplateArgument> TemplateArgs,
9894  ConstraintSatisfaction &Satisfaction);
9896  const TemplateArgumentList *Args,
9897  SourceLocation Loc);
9898  void InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
9899  FunctionDecl *Function,
9900  bool Recursive = false,
9901  bool DefinitionRequired = false,
9902  bool AtEndOfTU = false);
9904  VarTemplateDecl *VarTemplate, VarDecl *FromVar,
9905  const TemplateArgumentList &TemplateArgList,
9906  const TemplateArgumentListInfo &TemplateArgsInfo,
9908  SourceLocation PointOfInstantiation,
9909  LateInstantiatedAttrVec *LateAttrs = nullptr,
9910  LocalInstantiationScope *StartingScope = nullptr);
9912  VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl,
9913  const MultiLevelTemplateArgumentList &TemplateArgs);
9914  void
9915  BuildVariableInstantiation(VarDecl *NewVar, VarDecl *OldVar,
9916  const MultiLevelTemplateArgumentList &TemplateArgs,
9917  LateInstantiatedAttrVec *LateAttrs,
9918  DeclContext *Owner,
9919  LocalInstantiationScope *StartingScope,
9920  bool InstantiatingVarTemplate = false,
9921  VarTemplateSpecializationDecl *PrevVTSD = nullptr);
9922 
9924  VarDecl *Var, VarDecl *OldVar,
9925  const MultiLevelTemplateArgumentList &TemplateArgs);
9926  void InstantiateVariableDefinition(SourceLocation PointOfInstantiation,
9927  VarDecl *Var, bool Recursive = false,
9928  bool DefinitionRequired = false,
9929  bool AtEndOfTU = false);
9930 
9932  const CXXConstructorDecl *Tmpl,
9933  const MultiLevelTemplateArgumentList &TemplateArgs);
9934 
9936  const MultiLevelTemplateArgumentList &TemplateArgs,
9937  bool FindingInstantiatedContext = false);
9939  const MultiLevelTemplateArgumentList &TemplateArgs);
9940 
9941  // Objective-C declarations.
9943  OCK_None = -1,
9950  };
9952 
9954  ObjCTypeParamVariance variance,
9955  SourceLocation varianceLoc,
9956  unsigned index,
9957  IdentifierInfo *paramName,
9958  SourceLocation paramLoc,
9959  SourceLocation colonLoc,
9960  ParsedType typeBound);
9961 
9963  ArrayRef<Decl *> typeParams,
9964  SourceLocation rAngleLoc);
9965  void popObjCTypeParamList(Scope *S, ObjCTypeParamList *typeParamList);
9966 
9968  Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName,
9969  SourceLocation ClassLoc, ObjCTypeParamList *typeParamList,
9970  IdentifierInfo *SuperName, SourceLocation SuperLoc,
9971  ArrayRef<ParsedType> SuperTypeArgs, SourceRange SuperTypeArgsRange,
9972  Decl *const *ProtoRefs, unsigned NumProtoRefs,
9973  const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc,
9974  const ParsedAttributesView &AttrList);
9975 
9977  SourceLocation AtInterfaceLoc,
9978  ObjCInterfaceDecl *IDecl,
9979  IdentifierInfo *ClassName,
9980  SourceLocation ClassLoc,
9981  IdentifierInfo *SuperName,
9982  SourceLocation SuperLoc,
9983  ArrayRef<ParsedType> SuperTypeArgs,
9984  SourceRange SuperTypeArgsRange);
9985 
9987  SmallVectorImpl<SourceLocation> &ProtocolLocs,
9988  IdentifierInfo *SuperName,
9989  SourceLocation SuperLoc);
9990 
9992  SourceLocation AtCompatibilityAliasLoc,
9993  IdentifierInfo *AliasName, SourceLocation AliasLocation,
9994  IdentifierInfo *ClassName, SourceLocation ClassLocation);
9995 
9997  IdentifierInfo *PName,
9998  SourceLocation &PLoc, SourceLocation PrevLoc,
9999  const ObjCList<ObjCProtocolDecl> &PList);
10000 
10002  SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName,
10003  SourceLocation ProtocolLoc, Decl *const *ProtoRefNames,
10004  unsigned NumProtoRefs, const SourceLocation *ProtoLocs,
10005  SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList);
10006 
10008  SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName,
10009  SourceLocation ClassLoc, ObjCTypeParamList *typeParamList,
10010  IdentifierInfo *CategoryName, SourceLocation CategoryLoc,
10011  Decl *const *ProtoRefs, unsigned NumProtoRefs,
10012  const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc,
10013  const ParsedAttributesView &AttrList);
10014 
10016  IdentifierInfo *ClassName,
10017  SourceLocation ClassLoc,
10018  IdentifierInfo *SuperClassname,
10019  SourceLocation SuperClassLoc,
10020  const ParsedAttributesView &AttrList);
10021 
10023  IdentifierInfo *ClassName,
10024  SourceLocation ClassLoc,
10025  IdentifierInfo *CatName,
10026  SourceLocation CatLoc,
10027  const ParsedAttributesView &AttrList);
10028 
10030  ArrayRef<Decl *> Decls);
10031 
10033  IdentifierInfo **IdentList,
10034  SourceLocation *IdentLocs,
10035  ArrayRef<ObjCTypeParamList *> TypeParamLists,
10036  unsigned NumElts);
10037 
10040  ArrayRef<IdentifierLocPair> IdentList,
10041  const ParsedAttributesView &attrList);
10042 
10043  void FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer,
10044  ArrayRef<IdentifierLocPair> ProtocolId,
10045  SmallVectorImpl<Decl *> &Protocols);
10046 
10048  SourceLocation ProtocolLoc,
10049  IdentifierInfo *TypeArgId,
10050  SourceLocation TypeArgLoc,
10051  bool SelectProtocolFirst = false);
10052 
10053  /// Given a list of identifiers (and their locations), resolve the
10054  /// names to either Objective-C protocol qualifiers or type
10055  /// arguments, as appropriate.
10057  Scope *S,
10058  ParsedType baseType,
10059  SourceLocation lAngleLoc,
10060  ArrayRef<IdentifierInfo *> identifiers,
10061  ArrayRef<SourceLocation> identifierLocs,
10062  SourceLocation rAngleLoc,
10063  SourceLocation &typeArgsLAngleLoc,
10064  SmallVectorImpl<ParsedType> &typeArgs,
10065  SourceLocation &typeArgsRAngleLoc,
10066  SourceLocation &protocolLAngleLoc,
10067  SmallVectorImpl<Decl *> &protocols,
10068  SourceLocation &protocolRAngleLoc,
10069  bool warnOnIncompleteProtocols);
10070 
10071  /// Build a an Objective-C protocol-qualified 'id' type where no
10072  /// base type was specified.
10074  SourceLocation lAngleLoc,
10075  ArrayRef<Decl *> protocols,
10076  ArrayRef<SourceLocation> protocolLocs,
10077  SourceLocation rAngleLoc);
10078 
10079  /// Build a specialized and/or protocol-qualified Objective-C type.
10081  Scope *S,
10082  SourceLocation Loc,
10083  ParsedType BaseType,
10084  SourceLocation TypeArgsLAngleLoc,
10085  ArrayRef<ParsedType> TypeArgs,
10086  SourceLocation TypeArgsRAngleLoc,
10087  SourceLocation ProtocolLAngleLoc,
10088  ArrayRef<Decl *> Protocols,
10089  ArrayRef<SourceLocation> ProtocolLocs,
10090  SourceLocation ProtocolRAngleLoc);
10091 
10092  /// Build an Objective-C type parameter type.
10094  SourceLocation ProtocolLAngleLoc,
10095  ArrayRef<ObjCProtocolDecl *> Protocols,
10096  ArrayRef<SourceLocation> ProtocolLocs,
10097  SourceLocation ProtocolRAngleLoc,
10098  bool FailOnError = false);
10099 
10100  /// Build an Objective-C object pointer type.
10102  SourceLocation Loc,
10103  SourceLocation TypeArgsLAngleLoc,
10104  ArrayRef<TypeSourceInfo *> TypeArgs,
10105  SourceLocation TypeArgsRAngleLoc,
10106  SourceLocation ProtocolLAngleLoc,
10107  ArrayRef<ObjCProtocolDecl *> Protocols,
10108  ArrayRef<SourceLocation> ProtocolLocs,
10109  SourceLocation ProtocolRAngleLoc,
10110  bool FailOnError = false);
10111 
10112  /// Ensure attributes are consistent with type.
10113  /// \param [in, out] Attributes The attributes to check; they will
10114  /// be modified to be consistent with \p PropertyTy.
10115  void CheckObjCPropertyAttributes(Decl *PropertyPtrTy,
10116  SourceLocation Loc,
10117  unsigned &Attributes,
10118  bool propertyInPrimaryClass);
10119 
10120  /// Process the specified property declaration and create decls for the
10121  /// setters and getters as needed.
10122  /// \param property The property declaration being processed
10123  void ProcessPropertyDecl(ObjCPropertyDecl *property);
10124 
10125 
10127  ObjCPropertyDecl *SuperProperty,
10128  const IdentifierInfo *Name,
10129  bool OverridingProtocolProperty);
10130 
10133 
10134  Decl *ActOnAtEnd(Scope *S, SourceRange AtEnd,
10135  ArrayRef<Decl *> allMethods = None,
10136  ArrayRef<DeclGroupPtrTy> allTUVars = None);
10137 
10139  SourceLocation LParenLoc,
10140  FieldDeclarator &FD, ObjCDeclSpec &ODS,
10141  Selector GetterSel, Selector SetterSel,
10142  tok::ObjCKeywordKind MethodImplKind,
10143  DeclContext *lexicalDC = nullptr);
10144 
10146  SourceLocation AtLoc,
10147  SourceLocation PropertyLoc,
10148  bool ImplKind,
10149  IdentifierInfo *PropertyId,
10150  IdentifierInfo *PropertyIvar,
10151  SourceLocation PropertyIvarLoc,
10152  ObjCPropertyQueryKind QueryKind);
10153 
10161  };
10162 
10163  struct ObjCArgInfo {
10166  // The Type is null if no type was specified, and the DeclSpec is invalid
10167  // in this case.
10170 
10171  /// ArgAttrs - Attribute list for this argument.
10173  };
10174 
10176  Scope *S,
10177  SourceLocation BeginLoc, // location of the + or -.
10178  SourceLocation EndLoc, // location of the ; or {.
10179  tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType,
10180  ArrayRef<SourceLocation> SelectorLocs, Selector Sel,
10181  // optional arguments. The number of types/arguments is obtained
10182  // from the Sel.getNumArgs().
10183  ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo,
10184  unsigned CNumArgs, // c-style args
10185  const ParsedAttributesView &AttrList, tok::ObjCKeywordKind MethodImplKind,
10186  bool isVariadic, bool MethodDefinition);
10187 
10189  const ObjCObjectPointerType *OPT,
10190  bool IsInstance);
10192  bool IsInstance);
10193 
10194  bool CheckARCMethodDecl(ObjCMethodDecl *method);
10196 
10198 
10199  ExprResult
10201  Expr *BaseExpr,
10202  SourceLocation OpLoc,
10203  DeclarationName MemberName,
10204  SourceLocation MemberLoc,
10205  SourceLocation SuperLoc, QualType SuperType,
10206  bool Super);
10207 
10208  ExprResult
10210  IdentifierInfo &propertyName,
10211  SourceLocation receiverNameLoc,
10212  SourceLocation propertyNameLoc);
10213 
10215 
10216  /// Describes the kind of message expression indicated by a message
10217  /// send that starts with an identifier.
10219  /// The message is sent to 'super'.
10221  /// The message is an instance message.
10223  /// The message is a class message, and the identifier is a type
10224  /// name.
10226  };
10227 
10229  IdentifierInfo *Name,
10230  SourceLocation NameLoc,
10231  bool IsSuper,
10232  bool HasTrailingDot,
10233  ParsedType &ReceiverType);
10234 
10236  Selector Sel,
10237  SourceLocation LBracLoc,
10238  ArrayRef<SourceLocation> SelectorLocs,
10239  SourceLocation RBracLoc,
10240  MultiExprArg Args);
10241 
10242  ExprResult BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo,
10243  QualType ReceiverType,
10244  SourceLocation SuperLoc,
10245  Selector Sel,
10246  ObjCMethodDecl *Method,
10247  SourceLocation LBracLoc,
10248  ArrayRef<SourceLocation> SelectorLocs,
10249  SourceLocation RBracLoc,
10250  MultiExprArg Args,
10251  bool isImplicit = false);
10252 
10254  bool isSuperReceiver,
10255  SourceLocation Loc,
10256  Selector Sel,
10257  ObjCMethodDecl *Method,
10258  MultiExprArg Args);
10259 
10261  ParsedType Receiver,
10262  Selector Sel,
10263  SourceLocation LBracLoc,
10264  ArrayRef<SourceLocation> SelectorLocs,
10265  SourceLocation RBracLoc,
10266  MultiExprArg Args);
10267 
10269  QualType ReceiverType,
10270  SourceLocation SuperLoc,
10271  Selector Sel,
10272  ObjCMethodDecl *Method,
10273  SourceLocation LBracLoc,
10274  ArrayRef<SourceLocation> SelectorLocs,
10275  SourceLocation RBracLoc,
10276  MultiExprArg Args,
10277  bool isImplicit = false);
10278 
10280  QualType ReceiverType,
10281  SourceLocation Loc,
10282  Selector Sel,
10283  ObjCMethodDecl *Method,
10284  MultiExprArg Args);
10285 
10287  Expr *Receiver,
10288  Selector Sel,
10289  SourceLocation LBracLoc,
10290  ArrayRef<SourceLocation> SelectorLocs,
10291  SourceLocation RBracLoc,
10292  MultiExprArg Args);
10293 
10296  SourceLocation BridgeKeywordLoc,
10297  TypeSourceInfo *TSInfo,
10298  Expr *SubExpr);
10299 
10301  SourceLocation LParenLoc,
10303  SourceLocation BridgeKeywordLoc,
10304  ParsedType Type,
10305  SourceLocation RParenLoc,
10306  Expr *SubExpr);
10307 
10308  void CheckTollFreeBridgeCast(QualType castType, Expr *castExpr);
10309 
10311 
10313  CastKind &Kind);
10314 
10316  QualType DestType, QualType SrcType,
10317  ObjCInterfaceDecl *&RelatedClass,
10318  ObjCMethodDecl *&ClassMethod,
10319  ObjCMethodDecl *&InstanceMethod,
10320  TypedefNameDecl *&TDNDecl,
10321  bool CfToNs, bool Diagnose = true);
10322 
10324  QualType DestType, QualType SrcType,
10325  Expr *&SrcExpr, bool Diagnose = true);
10326 
10327  bool CheckConversionToObjCLiteral(QualType DstType, Expr *&SrcExpr,
10328  bool Diagnose = true);
10329 
10330  bool checkInitMethod(ObjCMethodDecl *method, QualType receiverTypeIfCall);
10331 
10332  /// Check whether the given new method is a valid override of the
10333  /// given overridden method, and set any properties that should be inherited.
10334  void CheckObjCMethodOverride(ObjCMethodDecl *NewMethod,
10335  const ObjCMethodDecl *Overridden);
10336 
10337  /// Describes the compatibility of a result type with its method.
10342  };
10343 
10345  ObjCMethodDecl *overridden);
10346 
10347  void CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod,
10348  ObjCInterfaceDecl *CurrentClass,
10350 
10352  POAK_Native, // #pragma options align=native
10353  POAK_Natural, // #pragma options align=natural
10354  POAK_Packed, // #pragma options align=packed
10355  POAK_Power, // #pragma options align=power
10356  POAK_Mac68k, // #pragma options align=mac68k
10357  POAK_Reset // #pragma options align=reset
10358  };
10359 
10360  /// ActOnPragmaClangSection - Called on well formed \#pragma clang section
10361  void ActOnPragmaClangSection(SourceLocation PragmaLoc,
10362  PragmaClangSectionAction Action,
10363  PragmaClangSectionKind SecKind, StringRef SecName);
10364 
10365  /// ActOnPragmaOptionsAlign - Called on well formed \#pragma options align.
10367  SourceLocation PragmaLoc);
10368 
10369  /// ActOnPragmaPack - Called on well formed \#pragma pack(...).
10370  void ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action,
10371  StringRef SlotLabel, Expr *Alignment);
10372 
10376  };
10377 
10379  SourceLocation IncludeLoc);
10381 
10382  /// ActOnPragmaMSStruct - Called on well formed \#pragma ms_struct [on|off].
10384 
10385  /// ActOnPragmaMSComment - Called on well formed
10386  /// \#pragma comment(kind, "arg").
10388  StringRef Arg);
10389 
10390  /// ActOnPragmaMSPointersToMembers - called on well formed \#pragma
10391  /// pointers_to_members(representation method[, general purpose
10392  /// representation]).
10395  SourceLocation PragmaLoc);
10396 
10397  /// Called on well formed \#pragma vtordisp().
10399  SourceLocation PragmaLoc,
10401 
10407  };
10408 
10409  bool UnifySection(StringRef SectionName, int SectionFlags,
10410  NamedDecl *TheDecl);
10411  bool UnifySection(StringRef SectionName,
10412  int SectionFlags,
10413  SourceLocation PragmaSectionLocation);
10414 
10415  /// Called on well formed \#pragma bss_seg/data_seg/const_seg/code_seg.
10416  void ActOnPragmaMSSeg(SourceLocation PragmaLocation,
10417  PragmaMsStackAction Action,
10418  llvm::StringRef StackSlotLabel,
10419  StringLiteral *SegmentName,
10420  llvm::StringRef PragmaName);
10421 
10422  /// Called on well formed \#pragma section().
10423  void ActOnPragmaMSSection(SourceLocation PragmaLocation,
10424  int SectionFlags, StringLiteral *SegmentName);
10425 
10426  /// Called on well-formed \#pragma init_seg().
10427  void ActOnPragmaMSInitSeg(SourceLocation PragmaLocation,
10428  StringLiteral *SegmentName);
10429 
10430  /// Called on #pragma clang __debug dump II
10432 
10433  /// ActOnPragmaDetectMismatch - Call on well-formed \#pragma detect_mismatch
10434  void ActOnPragmaDetectMismatch(SourceLocation Loc, StringRef Name,
10435  StringRef Value);
10436 
10437  /// Are precise floating point semantics currently enabled?
10439  return !CurFPFeatures.getAllowFPReassociate() &&
10440  !CurFPFeatures.getNoSignedZero() &&
10441  !CurFPFeatures.getAllowReciprocal() &&
10442  !CurFPFeatures.getAllowApproxFunc();
10443  }
10444 
10447 
10448  /// ActOnPragmaFloatControl - Call on well-formed \#pragma float_control
10451 
10452  /// ActOnPragmaUnused - Called on well-formed '\#pragma unused'.
10453  void ActOnPragmaUnused(const Token &Identifier,
10454  Scope *curScope,
10455  SourceLocation PragmaLoc);
10456 
10457  /// ActOnPragmaVisibility - Called on well formed \#pragma GCC visibility... .
10458  void ActOnPragmaVisibility(const IdentifierInfo* VisType,
10459  SourceLocation PragmaLoc);
10460 
10462  SourceLocation Loc);
10463  void DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, const WeakInfo &W);
10464 
10465  /// ActOnPragmaWeakID - Called on well formed \#pragma weak ident.
10466  void ActOnPragmaWeakID(IdentifierInfo* WeakName,
10467  SourceLocation PragmaLoc,
10468  SourceLocation WeakNameLoc);
10469 
10470  /// ActOnPragmaRedefineExtname - Called on well formed
10471  /// \#pragma redefine_extname oldname newname.
10473  IdentifierInfo* AliasName,
10474  SourceLocation PragmaLoc,
10475  SourceLocation WeakNameLoc,
10476  SourceLocation AliasNameLoc);
10477 
10478  /// ActOnPragmaWeakAlias - Called on well formed \#pragma weak ident = ident.
10479  void ActOnPragmaWeakAlias(IdentifierInfo* WeakName,
10480  IdentifierInfo* AliasName,
10481  SourceLocation PragmaLoc,
10482  SourceLocation WeakNameLoc,
10483  SourceLocation AliasNameLoc);
10484 
10485  /// ActOnPragmaFPContract - Called on well formed
10486  /// \#pragma {STDC,OPENCL} FP_CONTRACT and
10487  /// \#pragma clang fp contract
10489 
10490  /// Called on well formed
10491  /// \#pragma clang fp reassociate
10492  void ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled);
10493 
10494  /// ActOnPragmaFenvAccess - Called on well formed
10495  /// \#pragma STDC FENV_ACCESS
10496  void ActOnPragmaFEnvAccess(SourceLocation Loc, bool IsEnabled);
10497 
10498  /// Called on well formed '\#pragma clang fp' that has option 'exceptions'.
10501 
10502  /// Called to set constant rounding mode for floating point operations.
10503  void setRoundingMode(SourceLocation Loc, llvm::RoundingMode);
10504 
10505  /// Called to set exception behavior for floating point operations.
10507 
10508  /// AddAlignmentAttributesForRecord - Adds any needed alignment attributes to
10509  /// a the record decl, to handle '\#pragma pack' and '\#pragma options align'.
10511 
10512  /// AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
10514 
10515  /// PushNamespaceVisibilityAttr - Note that we've entered a
10516  /// namespace with a visibility attribute.
10517  void PushNamespaceVisibilityAttr(const VisibilityAttr *Attr,
10518  SourceLocation Loc);
10519 
10520  /// AddPushedVisibilityAttribute - If '\#pragma GCC visibility' was used,
10521  /// add an appropriate visibility attribute.
10523 
10524  /// PopPragmaVisibility - Pop the top element of the visibility stack; used
10525  /// for '\#pragma GCC visibility' and visibility attributes on namespaces.
10526  void PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc);
10527 
10528  /// FreeVisContext - Deallocate and null out VisContext.
10529  void FreeVisContext();
10530 
10531  /// AddCFAuditedAttribute - Check whether we're currently within
10532  /// '\#pragma clang arc_cf_code_audited' and, if so, consider adding
10533  /// the appropriate attribute.
10534  void AddCFAuditedAttribute(Decl *D);
10535 
10536  void ActOnPragmaAttributeAttribute(ParsedAttr &Attribute,
10537  SourceLocation PragmaLoc,
10540  const IdentifierInfo *Namespace);
10541 
10542  /// Called on well-formed '\#pragma clang attribute pop'.
10543  void ActOnPragmaAttributePop(SourceLocation PragmaLoc,
10544  const IdentifierInfo *Namespace);
10545 
10546  /// Adds the attributes that have been specified using the
10547  /// '\#pragma clang attribute push' directives to the given declaration.
10548  void AddPragmaAttributes(Scope *S, Decl *D);
10549 
10551 
10552  /// Called on well formed \#pragma clang optimize.
10553  void ActOnPragmaOptimize(bool On, SourceLocation PragmaLoc);
10554 
10555  /// Get the location for the currently active "\#pragma clang optimize
10556  /// off". If this location is invalid, then the state of the pragma is "on".
10559  }
10560 
10561  /// Only called on function definitions; if there is a pragma in scope
10562  /// with the effect of a range-based optnone, consider marking the function
10563  /// with attribute optnone.
10565 
10566  /// Adds the 'optnone' attribute to the function declaration if there
10567  /// are no conflicts; Loc represents the location causing the 'optnone'
10568  /// attribute to be added (usually because of a pragma).
10570 
10572  Expr **Exprs, unsigned Size);
10574  Expr *XDim, Expr *YDim, Expr *ZDim);
10575  WorkGroupSizeHintAttr *
10576  MergeWorkGroupSizeHintAttr(Decl *D, const WorkGroupSizeHintAttr &A);
10578  Expr *E);
10579  IntelReqdSubGroupSizeAttr *
10580  MergeIntelReqdSubGroupSizeAttr(Decl *D, const IntelReqdSubGroupSizeAttr &A);
10581  IntelNamedSubGroupSizeAttr *
10582  MergeIntelNamedSubGroupSizeAttr(Decl *D, const IntelNamedSubGroupSizeAttr &A);
10584  Expr *E);
10585  SYCLIntelNumSimdWorkItemsAttr *
10587  const SYCLIntelNumSimdWorkItemsAttr &A);
10589  Expr *E);
10590  SYCLIntelESimdVectorizeAttr *
10592  const SYCLIntelESimdVectorizeAttr &A);
10594  const AttributeCommonInfo &CI,
10595  Expr *E);
10596  SYCLIntelSchedulerTargetFmaxMhzAttr *MergeSYCLIntelSchedulerTargetFmaxMhzAttr(
10597  Decl *D, const SYCLIntelSchedulerTargetFmaxMhzAttr &A);
10599  const AttributeCommonInfo &CI,
10600  Expr *E);
10601  SYCLIntelNoGlobalWorkOffsetAttr *MergeSYCLIntelNoGlobalWorkOffsetAttr(
10602  Decl *D, const SYCLIntelNoGlobalWorkOffsetAttr &A);
10604  Expr *E);
10605  SYCLIntelLoopFuseAttr *
10606  MergeSYCLIntelLoopFuseAttr(Decl *D, const SYCLIntelLoopFuseAttr &A);
10608  Expr *E);
10610  Expr *E);
10611  IntelFPGAMaxReplicatesAttr *
10612  MergeIntelFPGAMaxReplicatesAttr(Decl *D, const IntelFPGAMaxReplicatesAttr &A);
10614  Expr *E);
10615  IntelFPGAForcePow2DepthAttr *
10617  const IntelFPGAForcePow2DepthAttr &A);
10619  const AttributeCommonInfo &CI,
10620  Expr *E);
10621  SYCLIntelFPGAInitiationIntervalAttr *MergeSYCLIntelFPGAInitiationIntervalAttr(
10622  Decl *D, const SYCLIntelFPGAInitiationIntervalAttr &A);
10623 
10624  SYCLIntelFPGAMaxConcurrencyAttr *MergeSYCLIntelFPGAMaxConcurrencyAttr(
10625  Decl *D, const SYCLIntelFPGAMaxConcurrencyAttr &A);
10627  Expr *E);
10628  SYCLIntelMaxGlobalWorkDimAttr *
10630  const SYCLIntelMaxGlobalWorkDimAttr &A);
10632  Expr *E);
10633  IntelFPGABankWidthAttr *
10634  MergeIntelFPGABankWidthAttr(Decl *D, const IntelFPGABankWidthAttr &A);
10636  Expr *E);
10637  IntelFPGANumBanksAttr *
10638  MergeIntelFPGANumBanksAttr(Decl *D, const IntelFPGANumBanksAttr &A);
10639  SYCLDeviceHasAttr *MergeSYCLDeviceHasAttr(Decl *D,
10640  const SYCLDeviceHasAttr &A);
10641  void AddSYCLDeviceHasAttr(Decl *D, const AttributeCommonInfo &CI,
10642  Expr **Exprs, unsigned Size);
10643  SYCLUsesAspectsAttr *MergeSYCLUsesAspectsAttr(Decl *D,
10644  const SYCLUsesAspectsAttr &A);
10645  void AddSYCLUsesAspectsAttr(Decl *D, const AttributeCommonInfo &CI,
10646  Expr **Exprs, unsigned Size);
10648  Expr *XDim, Expr *YDim, Expr *ZDim);
10649  SYCLIntelMaxWorkGroupSizeAttr *
10651  const SYCLIntelMaxWorkGroupSizeAttr &A);
10652  SYCLAddIRAttributesFunctionAttr *MergeSYCLAddIRAttributesFunctionAttr(
10653  Decl *D, const SYCLAddIRAttributesFunctionAttr &A);
10655  const AttributeCommonInfo &CI,
10657  SYCLAddIRAttributesKernelParameterAttr *
10659  Decl *D, const SYCLAddIRAttributesKernelParameterAttr &A);
10661  const AttributeCommonInfo &CI,
10663  SYCLAddIRAttributesGlobalVariableAttr *
10665  Decl *D, const SYCLAddIRAttributesGlobalVariableAttr &A);
10667  const AttributeCommonInfo &CI,
10670  Expr *XDim, Expr *YDim, Expr *ZDim);
10671  ReqdWorkGroupSizeAttr *
10672  MergeReqdWorkGroupSizeAttr(Decl *D, const ReqdWorkGroupSizeAttr &A);
10673  /// AddAlignedAttr - Adds an aligned attribute to a particular declaration.
10674  void AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E,
10675  bool IsPackExpansion);
10676  void AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, TypeSourceInfo *T,
10677  bool IsPackExpansion);
10678 
10679  /// AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular
10680  /// declaration.
10681  void AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E,
10682  Expr *OE);
10683 
10684  /// AddAllocAlignAttr - Adds an alloc_align attribute to a particular
10685  /// declaration.
10686  void AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI,
10687  Expr *ParamExpr);
10688 
10689  /// AddAlignValueAttr - Adds an align_value attribute to a particular
10690  /// declaration.
10691  void AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E);
10692 
10693  /// AddAnnotationAttr - Adds an annotation Annot with Args arguments to D.
10694  void AddAnnotationAttr(Decl *D, const AttributeCommonInfo &CI,
10695  StringRef Annot, MutableArrayRef<Expr *> Args);
10696 
10697  /// AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular
10698  /// declaration.
10699  void AddLaunchBoundsAttr(Decl *D, const AttributeCommonInfo &CI,
10700  Expr *MaxThreads, Expr *MinBlocks);
10701 
10702  /// AddModeAttr - Adds a mode attribute to a particular declaration.
10703  void AddModeAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name,
10704  bool InInstantiation = false);
10705 
10706  void AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI,
10707  ParameterABI ABI);
10708 
10709  enum class RetainOwnershipKind {NS, CF, OS};
10710  void AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI,
10711  RetainOwnershipKind K, bool IsTemplateInstantiation);
10712 
10713  /// addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size
10714  /// attribute to a particular declaration.
10716  Expr *Min, Expr *Max);
10717 
10718  /// addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a
10719  /// particular declaration.
10721  Expr *Min, Expr *Max);
10722 
10723  /// addSYCLIntelPipeIOAttr - Adds a pipe I/O attribute to a particular
10724  /// declaration.
10725  void addSYCLIntelPipeIOAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ID);
10726  SYCLIntelPipeIOAttr *MergeSYCLIntelPipeIOAttr(Decl *D,
10727  const SYCLIntelPipeIOAttr &A);
10728 
10729  /// AddSYCLIntelFPGAMaxConcurrencyAttr - Adds a max_concurrency attribute to a
10730  /// particular declaration.
10732  const AttributeCommonInfo &CI,
10733  Expr *E);
10734 
10737  //===--------------------------------------------------------------------===//
10738  // C++ Coroutines TS
10739  //
10741  StringRef Keyword);
10745 
10747  bool IsImplicit = false);
10749  UnresolvedLookupExpr* Lookup);
10752  bool IsImplicit = false);
10756  void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body);
10757  /// Lookup 'coroutine_traits' in std namespace and std::experimental
10758  /// namespace. The namespace found is recorded in Namespace.
10760  SourceLocation FuncLoc,
10761  NamespaceDecl *&Namespace);
10762  /// Check that the expression co_await promise.final_suspend() shall not be
10763  /// potentially-throwing.
10764  bool checkFinalSuspendNoThrow(const Stmt *FinalSuspend);
10765 
10766  //===--------------------------------------------------------------------===//
10767  // OpenMP directives and clauses.
10768  //
10769 private:
10770  void *VarDataSharingAttributesStack;
10771 
10772  struct DeclareTargetContextInfo {
10773  struct MapInfo {
10774  OMPDeclareTargetDeclAttr::MapTypeTy MT;
10776  };
10777  /// Explicitly listed variables and functions in a 'to' or 'link' clause.
10778  llvm::DenseMap<NamedDecl *, MapInfo> ExplicitlyMapped;
10779 
10780  /// The 'device_type' as parsed from the clause.
10781  OMPDeclareTargetDeclAttr::DevTypeTy DT = OMPDeclareTargetDeclAttr::DT_Any;
10782 
10783  /// The directive kind, `begin declare target` or `declare target`.
10785 
10786  /// The directive with indirect clause.
10787  Optional<Expr *> Indirect;
10788 
10789  /// The directive location.
10790  SourceLocation Loc;
10791 
10792  DeclareTargetContextInfo(OpenMPDirectiveKind Kind, SourceLocation Loc)
10793  : Kind(Kind), Loc(Loc) {}
10794  };
10795 
10796  /// Number of nested '#pragma omp declare target' directives.
10797  SmallVector<DeclareTargetContextInfo, 4> DeclareTargetNesting;
10798 
10799  /// Initialization of data-sharing attributes stack.
10800  void InitDataSharingAttributesStack();
10801  void DestroyDataSharingAttributesStack();
10802  ExprResult
10803  VerifyPositiveIntegerConstantInClause(Expr *Op, OpenMPClauseKind CKind,
10804  bool StrictlyPositive = true,
10805  bool SuppressExprDiags = false);
10806  /// Returns OpenMP nesting level for current directive.
10807  unsigned getOpenMPNestingLevel() const;
10808 
10809  /// Adjusts the function scopes index for the target-based regions.
10810  void adjustOpenMPTargetScopeIndex(unsigned &FunctionScopesIndex,
10811  unsigned Level) const;
10812 
10813  /// Returns the number of scopes associated with the construct on the given
10814  /// OpenMP level.
10815  int getNumberOfConstructScopes(unsigned Level) const;
10816 
10817  /// Push new OpenMP function region for non-capturing function.
10818  void pushOpenMPFunctionRegion();
10819 
10820  /// Pop OpenMP function region for non-capturing function.
10821  void popOpenMPFunctionRegion(const sema::FunctionScopeInfo *OldFSI);
10822 
10823  /// Analyzes and checks a loop nest for use by a loop transformation.
10824  ///
10825  /// \param Kind The loop transformation directive kind.
10826  /// \param NumLoops How many nested loops the directive is expecting.
10827  /// \param AStmt Associated statement of the transformation directive.
10828  /// \param LoopHelpers [out] The loop analysis result.
10829  /// \param Body [out] The body code nested in \p NumLoops loop.
10830  /// \param OriginalInits [out] Collection of statements and declarations that
10831  /// must have been executed/declared before entering the
10832  /// loop.
10833  ///
10834  /// \return Whether there was any error.
10835  bool checkTransformableLoopNest(
10836  OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops,
10838  Stmt *&Body,
10839  SmallVectorImpl<SmallVector<llvm::PointerUnion<Stmt *, Decl *>, 0>>
10840  &OriginalInits);
10841 
10842  /// Helper to keep information about the current `omp begin/end declare
10843  /// variant` nesting.
10844  struct OMPDeclareVariantScope {
10845  /// The associated OpenMP context selector.
10846  OMPTraitInfo *TI;
10847 
10848  /// The associated OpenMP context selector mangling.
10849  std::string NameSuffix;
10850 
10851  OMPDeclareVariantScope(OMPTraitInfo &TI);
10852  };
10853 
10854  /// Return the OMPTraitInfo for the surrounding scope, if any.
10855  OMPTraitInfo *getOMPTraitInfoForSurroundingScope() {
10856  return OMPDeclareVariantScopes.empty() ? nullptr
10857  : OMPDeclareVariantScopes.back().TI;
10858  }
10859 
10860  /// The current `omp begin/end declare variant` scopes.
10861  SmallVector<OMPDeclareVariantScope, 4> OMPDeclareVariantScopes;
10862 
10863  /// The current `omp begin/end assumes` scopes.
10864  SmallVector<AssumptionAttr *, 4> OMPAssumeScoped;
10865 
10866  /// All `omp assumes` we encountered so far.
10867  SmallVector<AssumptionAttr *, 4> OMPAssumeGlobal;
10868 
10869 public:
10870  /// The declarator \p D defines a function in the scope \p S which is nested
10871  /// in an `omp begin/end declare variant` scope. In this method we create a
10872  /// declaration for \p D and rename \p D according to the OpenMP context
10873  /// selector of the surrounding scope. Return all base functions in \p Bases.
10875  Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists,
10876  SmallVectorImpl<FunctionDecl *> &Bases);
10877 
10878  /// Register \p D as specialization of all base functions in \p Bases in the
10879  /// current `omp begin/end declare variant` scope.
10881  Decl *D, SmallVectorImpl<FunctionDecl *> &Bases);
10882 
10883  /// Act on \p D, a function definition inside of an `omp [begin/end] assumes`.
10885 
10886  /// Can we exit an OpenMP declare variant scope at the moment.
10888  return !OMPDeclareVariantScopes.empty();
10889  }
10890 
10891  /// Given the potential call expression \p Call, determine if there is a
10892  /// specialization via the OpenMP declare variant mechanism available. If
10893  /// there is, return the specialized call expression, otherwise return the
10894  /// original \p Call.
10896  SourceLocation LParenLoc, MultiExprArg ArgExprs,
10897  SourceLocation RParenLoc, Expr *ExecConfig);
10898 
10899  /// Handle a `omp begin declare variant`.
10901 
10902  /// Handle a `omp end declare variant`.
10904 
10905  /// Checks if the variant/multiversion functions are compatible.
10907  const FunctionDecl *OldFD, const FunctionDecl *NewFD,
10908  const PartialDiagnostic &NoProtoDiagID,
10909  const PartialDiagnosticAt &NoteCausedDiagIDAt,
10910  const PartialDiagnosticAt &NoSupportDiagIDAt,
10911  const PartialDiagnosticAt &DiffDiagIDAt, bool TemplatesSupported,
10912  bool ConstexprSupported, bool CLinkageMayDiffer);
10913 
10914  /// Function tries to capture lambda's captured variables in the OpenMP region
10915  /// before the original lambda is captured.
10917 
10918  /// Return true if the provided declaration \a VD should be captured by
10919  /// reference.
10920  /// \param Level Relative level of nested OpenMP construct for that the check
10921  /// is performed.
10922  /// \param OpenMPCaptureLevel Capture level within an OpenMP construct.
10923  bool isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level,
10924  unsigned OpenMPCaptureLevel) const;
10925 
10926  /// Check if the specified variable is used in one of the private
10927  /// clauses (private, firstprivate, lastprivate, reduction etc.) in OpenMP
10928  /// constructs.
10929  VarDecl *isOpenMPCapturedDecl(ValueDecl *D, bool CheckScopeInfo = false,
10930  unsigned StopAt = 0);
10932  ExprObjectKind OK, SourceLocation Loc);
10933 
10934  /// If the current region is a loop-based region, mark the start of the loop
10935  /// construct.
10936  void startOpenMPLoop();
10937 
10938  /// If the current region is a range loop-based region, mark the start of the
10939  /// loop construct.
10940  void startOpenMPCXXRangeFor();
10941 
10942  /// Check if the specified variable is used in 'private' clause.
10943  /// \param Level Relative level of nested OpenMP construct for that the check
10944  /// is performed.
10946  unsigned CapLevel) const;
10947 
10948  /// Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.)
10949  /// for \p FD based on DSA for the provided corresponding captured declaration
10950  /// \p D.
10951  void setOpenMPCaptureKind(FieldDecl *FD, const ValueDecl *D, unsigned Level);
10952 
10953  /// Check if the specified variable is captured by 'target' directive.
10954  /// \param Level Relative level of nested OpenMP construct for that the check
10955  /// is performed.
10956  bool isOpenMPTargetCapturedDecl(const ValueDecl *D, unsigned Level,
10957  unsigned CaptureLevel) const;
10958 
10959  /// Check if the specified global variable must be captured by outer capture
10960  /// regions.
10961  /// \param Level Relative level of nested OpenMP construct for that
10962  /// the check is performed.
10963  bool isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level,
10964  unsigned CaptureLevel) const;
10965 
10967  Expr *Op);
10968  /// Called on start of new data sharing attribute block.
10970  const DeclarationNameInfo &DirName, Scope *CurScope,
10971  SourceLocation Loc);
10972  /// Start analysis of clauses.
10974  /// End analysis of clauses.
10975  void EndOpenMPClause();
10976  /// Called on end of data sharing attribute block.
10977  void EndOpenMPDSABlock(Stmt *CurDirective);
10978 
10979  /// Check if the current region is an OpenMP loop region and if it is,
10980  /// mark loop control variable, used in \p Init for loop initialization, as
10981  /// private by default.
10982  /// \param Init First part of the for loop.
10984 
10985  /// Called on well-formed '\#pragma omp metadirective' after parsing
10986  /// of the associated statement.
10988  Stmt *AStmt, SourceLocation StartLoc,
10989  SourceLocation EndLoc);
10990 
10991  // OpenMP directives and clauses.
10992  /// Called on correct id-expression from the '#pragma omp
10993  /// threadprivate'.
10994  ExprResult ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec,
10995  const DeclarationNameInfo &Id,
10997  /// Called on well-formed '#pragma omp threadprivate'.
10999  SourceLocation Loc,
11000  ArrayRef<Expr *> VarList);
11001  /// Builds a new OpenMPThreadPrivateDecl and checks its correctness.
11003  ArrayRef<Expr *> VarList);
11004  /// Called on well-formed '#pragma omp allocate'.
11006  ArrayRef<Expr *> VarList,
11007  ArrayRef<OMPClause *> Clauses,
11008  DeclContext *Owner = nullptr);
11009 
11010  /// Called on well-formed '#pragma omp [begin] assume[s]'.
11012  OpenMPDirectiveKind DKind,
11013  ArrayRef<std::string> Assumptions,
11014  bool SkippedClauses);
11015 
11016  /// Check if there is an active global `omp begin assumes` directive.
11017  bool isInOpenMPAssumeScope() const { return !OMPAssumeScoped.empty(); }
11018 
11019  /// Check if there is an active global `omp assumes` directive.
11020  bool hasGlobalOpenMPAssumes() const { return !OMPAssumeGlobal.empty(); }
11021 
11022  /// Called on well-formed '#pragma omp end assumes'.
11024 
11025  /// Called on well-formed '#pragma omp requires'.
11027  ArrayRef<OMPClause *> ClauseList);
11028  /// Check restrictions on Requires directive
11030  ArrayRef<OMPClause *> Clauses);
11031  /// Check if the specified type is allowed to be used in 'omp declare
11032  /// reduction' construct.
11035  /// Called on start of '#pragma omp declare reduction'.
11037  Scope *S, DeclContext *DC, DeclarationName Name,
11038  ArrayRef<std::pair<QualType, SourceLocation>> ReductionTypes,
11039  AccessSpecifier AS, Decl *PrevDeclInScope = nullptr);
11040  /// Initialize declare reduction construct initializer.
11042  /// Finish current declare reduction construct initializer.
11043  void ActOnOpenMPDeclareReductionCombinerEnd(Decl *D, Expr *Combiner);
11044  /// Initialize declare reduction construct initializer.
11045  /// \return omp_priv variable.
11047  /// Finish current declare reduction construct initializer.
11048  void ActOnOpenMPDeclareReductionInitializerEnd(Decl *D, Expr *Initializer,
11049  VarDecl *OmpPrivParm);
11050  /// Called at the end of '#pragma omp declare reduction'.
11052  Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid);
11053 
11054  /// Check variable declaration in 'omp declare mapper' construct.
11056  /// Check if the specified type is allowed to be used in 'omp declare
11057  /// mapper' construct.
11060  /// Called on start of '#pragma omp declare mapper'.
11062  Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType,
11064  Expr *MapperVarRef, ArrayRef<OMPClause *> Clauses,
11065  Decl *PrevDeclInScope = nullptr);
11066  /// Build the mapper variable of '#pragma omp declare mapper'.
11068  QualType MapperType,
11069  SourceLocation StartLoc,
11070  DeclarationName VN);
11071  bool isOpenMPDeclareMapperVarDeclAllowed(const VarDecl *VD) const;
11073 
11074  /// Called on the start of target region i.e. '#pragma omp declare target'.
11075  bool ActOnStartOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI);
11076 
11077  /// Called at the end of target region i.e. '#pragma omp end declare target'.
11078  const DeclareTargetContextInfo ActOnOpenMPEndDeclareTargetDirective();
11079 
11080  /// Called once a target context is completed, that can be when a
11081  /// '#pragma omp end declare target' was encountered or when a
11082  /// '#pragma omp declare target' without declaration-definition-seq was
11083  /// encountered.
11084  void ActOnFinishedOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI);
11085 
11086  /// Searches for the provided declaration name for OpenMP declare target
11087  /// directive.
11089  CXXScopeSpec &ScopeSpec,
11090  const DeclarationNameInfo &Id);
11091 
11092  /// Called on correct id-expression from the '#pragma omp declare target'.
11094  OMPDeclareTargetDeclAttr::MapTypeTy MT,
11095  DeclareTargetContextInfo &DTCI);
11096 
11097  /// Check declaration inside target region.
11098  void
11100  SourceLocation IdLoc = SourceLocation());
11101  /// Finishes analysis of the deferred functions calls that may be declared as
11102  /// host/nohost during device/host compilation.
11103  void finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller,
11104  const FunctionDecl *Callee,
11105  SourceLocation Loc);
11106 
11107  /// Return true if currently in OpenMP task with untied clause context.
11108  bool isInOpenMPTaskUntiedContext() const;
11109 
11110  /// Return true inside OpenMP declare target region.
11112  return !DeclareTargetNesting.empty();
11113  }
11114  /// Return true inside OpenMP target region.
11116 
11117  /// Return the number of captured regions created for an OpenMP directive.
11119 
11120  /// Initialization of captured region for OpenMP region.
11121  void ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope);
11122 
11123  /// Called for syntactical loops (ForStmt or CXXForRangeStmt) associated to
11124  /// an OpenMP loop directive.
11126 
11127  /// Process a canonical OpenMP loop nest that can either be a canonical
11128  /// literal loop (ForStmt or CXXForRangeStmt), or the generated loop of an
11129  /// OpenMP loop transformation construct.
11131 
11132  /// End of OpenMP region.
11133  ///
11134  /// \param S Statement associated with the current OpenMP region.
11135  /// \param Clauses List of clauses for the current OpenMP region.
11136  ///
11137  /// \returns Statement for finished OpenMP region.
11141  OpenMPDirectiveKind CancelRegion, ArrayRef<OMPClause *> Clauses,
11142  Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc);
11143  /// Called on well-formed '\#pragma omp parallel' after parsing
11144  /// of the associated statement.
11146  Stmt *AStmt,
11147  SourceLocation StartLoc,
11148  SourceLocation EndLoc);
11149  using VarsWithInheritedDSAType =
11150  llvm::SmallDenseMap<const ValueDecl *, const Expr *, 4>;
11151  /// Called on well-formed '\#pragma omp simd' after parsing
11152  /// of the associated statement.
11153  StmtResult
11155  SourceLocation StartLoc, SourceLocation EndLoc,
11156  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11157  /// Called on well-formed '#pragma omp tile' after parsing of its clauses and
11158  /// the associated statement.
11160  Stmt *AStmt, SourceLocation StartLoc,
11161  SourceLocation EndLoc);
11162  /// Called on well-formed '#pragma omp unroll' after parsing of its clauses
11163  /// and the associated statement.
11165  Stmt *AStmt, SourceLocation StartLoc,
11166  SourceLocation EndLoc);
11167  /// Called on well-formed '\#pragma omp for' after parsing
11168  /// of the associated statement.
11169  StmtResult
11171  SourceLocation StartLoc, SourceLocation EndLoc,
11172  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11173  /// Called on well-formed '\#pragma omp for simd' after parsing
11174  /// of the associated statement.
11175  StmtResult
11177  SourceLocation StartLoc, SourceLocation EndLoc,
11178  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11179  /// Called on well-formed '\#pragma omp sections' after parsing
11180  /// of the associated statement.
11182  Stmt *AStmt, SourceLocation StartLoc,
11183  SourceLocation EndLoc);
11184  /// Called on well-formed '\#pragma omp section' after parsing of the
11185  /// associated statement.
11187  SourceLocation EndLoc);
11188  /// Called on well-formed '\#pragma omp single' after parsing of the
11189  /// associated statement.
11191  Stmt *AStmt, SourceLocation StartLoc,
11192  SourceLocation EndLoc);
11193  /// Called on well-formed '\#pragma omp master' after parsing of the
11194  /// associated statement.
11196  SourceLocation EndLoc);
11197  /// Called on well-formed '\#pragma omp critical' after parsing of the
11198  /// associated statement.
11200  ArrayRef<OMPClause *> Clauses,
11201  Stmt *AStmt, SourceLocation StartLoc,
11202  SourceLocation EndLoc);
11203  /// Called on well-formed '\#pragma omp parallel for' after parsing
11204  /// of the associated statement.
11206  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11207  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11208  /// Called on well-formed '\#pragma omp parallel for simd' after
11209  /// parsing of the associated statement.
11211  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11212  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11213  /// Called on well-formed '\#pragma omp parallel master' after
11214  /// parsing of the associated statement.
11216  Stmt *AStmt,
11217  SourceLocation StartLoc,
11218  SourceLocation EndLoc);
11219  /// Called on well-formed '\#pragma omp parallel sections' after
11220  /// parsing of the associated statement.
11222  Stmt *AStmt,
11223  SourceLocation StartLoc,
11224  SourceLocation EndLoc);
11225  /// Called on well-formed '\#pragma omp task' after parsing of the
11226  /// associated statement.
11228  Stmt *AStmt, SourceLocation StartLoc,
11229  SourceLocation EndLoc);
11230  /// Called on well-formed '\#pragma omp taskyield'.
11232  SourceLocation EndLoc);
11233  /// Called on well-formed '\#pragma omp barrier'.
11235  SourceLocation EndLoc);
11236  /// Called on well-formed '\#pragma omp taskwait'.
11238  SourceLocation StartLoc,
11239  SourceLocation EndLoc);
11240  /// Called on well-formed '\#pragma omp taskgroup'.
11242  Stmt *AStmt, SourceLocation StartLoc,
11243  SourceLocation EndLoc);
11244  /// Called on well-formed '\#pragma omp flush'.
11246  SourceLocation StartLoc,
11247  SourceLocation EndLoc);
11248  /// Called on well-formed '\#pragma omp depobj'.
11250  SourceLocation StartLoc,
11251  SourceLocation EndLoc);
11252  /// Called on well-formed '\#pragma omp scan'.
11254  SourceLocation StartLoc,
11255  SourceLocation EndLoc);
11256  /// Called on well-formed '\#pragma omp ordered' after parsing of the
11257  /// associated statement.
11259  Stmt *AStmt, SourceLocation StartLoc,
11260  SourceLocation EndLoc);
11261  /// Called on well-formed '\#pragma omp atomic' after parsing of the
11262  /// associated statement.
11264  Stmt *AStmt, SourceLocation StartLoc,
11265  SourceLocation EndLoc);
11266  /// Called on well-formed '\#pragma omp target' after parsing of the
11267  /// associated statement.
11269  Stmt *AStmt, SourceLocation StartLoc,
11270  SourceLocation EndLoc);
11271  /// Called on well-formed '\#pragma omp target data' after parsing of
11272  /// the associated statement.
11274  Stmt *AStmt, SourceLocation StartLoc,
11275  SourceLocation EndLoc);
11276  /// Called on well-formed '\#pragma omp target enter data' after
11277  /// parsing of the associated statement.
11279  SourceLocation StartLoc,
11280  SourceLocation EndLoc,
11281  Stmt *AStmt);
11282  /// Called on well-formed '\#pragma omp target exit data' after
11283  /// parsing of the associated statement.
11285  SourceLocation StartLoc,
11286  SourceLocation EndLoc,
11287  Stmt *AStmt);
11288  /// Called on well-formed '\#pragma omp target parallel' after
11289  /// parsing of the associated statement.
11291  Stmt *AStmt,
11292  SourceLocation StartLoc,
11293  SourceLocation EndLoc);
11294  /// Called on well-formed '\#pragma omp target parallel for' after
11295  /// parsing of the associated statement.
11297  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11298  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11299  /// Called on well-formed '\#pragma omp teams' after parsing of the
11300  /// associated statement.
11302  Stmt *AStmt, SourceLocation StartLoc,
11303  SourceLocation EndLoc);
11304  /// Called on well-formed '\#pragma omp teams loop' after parsing of the
11305  /// associated statement.
11307  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11308  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11309  /// Called on well-formed '\#pragma omp target teams loop' after parsing of
11310  /// the associated statement.
11312  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11313  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11314  /// Called on well-formed '\#pragma omp parallel loop' after parsing of the
11315  /// associated statement.
11317  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11318  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11319  /// Called on well-formed '\#pragma omp target parallel loop' after parsing
11320  /// of the associated statement.
11322  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11323  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11324  /// Called on well-formed '\#pragma omp cancellation point'.
11325  StmtResult
11327  SourceLocation EndLoc,
11328  OpenMPDirectiveKind CancelRegion);
11329  /// Called on well-formed '\#pragma omp cancel'.
11331  SourceLocation StartLoc,
11332  SourceLocation EndLoc,
11333  OpenMPDirectiveKind CancelRegion);
11334  /// Called on well-formed '\#pragma omp taskloop' after parsing of the
11335  /// associated statement.
11336  StmtResult
11338  SourceLocation StartLoc, SourceLocation EndLoc,
11339  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11340  /// Called on well-formed '\#pragma omp taskloop simd' after parsing of
11341  /// the associated statement.
11343  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11344  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11345  /// Called on well-formed '\#pragma omp master taskloop' after parsing of the
11346  /// associated statement.
11348  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11349  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11350  /// Called on well-formed '\#pragma omp master taskloop simd' after parsing of
11351  /// the associated statement.
11353  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11354  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11355  /// Called on well-formed '\#pragma omp parallel master taskloop' after
11356  /// parsing of the associated statement.
11358  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11359  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11360  /// Called on well-formed '\#pragma omp parallel master taskloop simd' after
11361  /// parsing of the associated statement.
11363  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11364  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11365  /// Called on well-formed '\#pragma omp distribute' after parsing
11366  /// of the associated statement.
11367  StmtResult
11369  SourceLocation StartLoc, SourceLocation EndLoc,
11370  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11371  /// Called on well-formed '\#pragma omp target update'.
11373  SourceLocation StartLoc,
11374  SourceLocation EndLoc,
11375  Stmt *AStmt);
11376  /// Called on well-formed '\#pragma omp distribute parallel for' after
11377  /// parsing of the associated statement.
11379  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11380  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11381  /// Called on well-formed '\#pragma omp distribute parallel for simd'
11382  /// after parsing of the associated statement.
11384  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11385  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11386  /// Called on well-formed '\#pragma omp distribute simd' after
11387  /// parsing of the associated statement.
11389  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11390  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11391  /// Called on well-formed '\#pragma omp target parallel for simd' after
11392  /// parsing of the associated statement.
11394  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11395  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11396  /// Called on well-formed '\#pragma omp target simd' after parsing of
11397  /// the associated statement.
11398  StmtResult
11400  SourceLocation StartLoc, SourceLocation EndLoc,
11401  VarsWithInheritedDSAType &VarsWithImplicitDSA);
11402  /// Called on well-formed '\#pragma omp teams distribute' after parsing of
11403  /// the associated statement.
11405  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11406  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11407  /// Called on well-formed '\#pragma omp teams distribute simd' after parsing
11408  /// of the associated statement.
11410  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11411  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11412  /// Called on well-formed '\#pragma omp teams distribute parallel for simd'
11413  /// after parsing of the associated statement.
11415  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11416  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11417  /// Called on well-formed '\#pragma omp teams distribute parallel for'
11418  /// after parsing of the associated statement.
11420  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11421  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11422  /// Called on well-formed '\#pragma omp target teams' after parsing of the
11423  /// associated statement.
11425  Stmt *AStmt,
11426  SourceLocation StartLoc,
11427  SourceLocation EndLoc);
11428  /// Called on well-formed '\#pragma omp target teams distribute' after parsing
11429  /// of the associated statement.
11431  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11432  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11433  /// Called on well-formed '\#pragma omp target teams distribute parallel for'
11434  /// after parsing of the associated statement.
11436  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11437  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11438  /// Called on well-formed '\#pragma omp target teams distribute parallel for
11439  /// simd' after parsing of the associated statement.
11441  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11442  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11443  /// Called on well-formed '\#pragma omp target teams distribute simd' after
11444  /// parsing of the associated statement.
11446  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11447  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11448  /// Called on well-formed '\#pragma omp interop'.
11450  SourceLocation StartLoc,
11451  SourceLocation EndLoc);
11452  /// Called on well-formed '\#pragma omp dispatch' after parsing of the
11453  // /associated statement.
11455  Stmt *AStmt, SourceLocation StartLoc,
11456  SourceLocation EndLoc);
11457  /// Called on well-formed '\#pragma omp masked' after parsing of the
11458  // /associated statement.
11460  Stmt *AStmt, SourceLocation StartLoc,
11461  SourceLocation EndLoc);
11462 
11463  /// Called on well-formed '\#pragma omp loop' after parsing of the
11464  /// associated statement.
11466  ArrayRef<OMPClause *> Clauses, Stmt *AStmt, SourceLocation StartLoc,
11467  SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA);
11468 
11469  /// Checks correctness of linear modifiers.
11471  SourceLocation LinLoc);
11472  /// Checks that the specified declaration matches requirements for the linear
11473  /// decls.
11474  bool CheckOpenMPLinearDecl(const ValueDecl *D, SourceLocation ELoc,
11476  bool IsDeclareSimd = false);
11477 
11478  /// Called on well-formed '\#pragma omp declare simd' after parsing of
11479  /// the associated method/function.
11481  DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS,
11482  Expr *Simdlen, ArrayRef<Expr *> Uniforms, ArrayRef<Expr *> Aligneds,
11483  ArrayRef<Expr *> Alignments, ArrayRef<Expr *> Linears,
11484  ArrayRef<unsigned> LinModifiers, ArrayRef<Expr *> Steps, SourceRange SR);
11485 
11486  /// Checks '\#pragma omp declare variant' variant function and original
11487  /// functions after parsing of the associated method/function.
11488  /// \param DG Function declaration to which declare variant directive is
11489  /// applied to.
11490  /// \param VariantRef Expression that references the variant function, which
11491  /// must be used instead of the original one, specified in \p DG.
11492  /// \param TI The trait info object representing the match clause.
11493  /// \param NumAppendArgs The number of omp_interop_t arguments to account for
11494  /// in checking.
11495  /// \returns None, if the function/variant function are not compatible with
11496  /// the pragma, pair of original function/variant ref expression otherwise.
11499  OMPTraitInfo &TI, unsigned NumAppendArgs,
11500  SourceRange SR);
11501 
11502  /// Called on well-formed '\#pragma omp declare variant' after parsing of
11503  /// the associated method/function.
11504  /// \param FD Function declaration to which declare variant directive is
11505  /// applied to.
11506  /// \param VariantRef Expression that references the variant function, which
11507  /// must be used instead of the original one, specified in \p DG.
11508  /// \param TI The context traits associated with the function variant.
11509  /// \param AdjustArgsNothing The list of 'nothing' arguments.
11510  /// \param AdjustArgsNeedDevicePtr The list of 'need_device_ptr' arguments.
11511  /// \param AppendArgs The list of 'append_args' arguments.
11512  /// \param AdjustArgsLoc The Location of an 'adjust_args' clause.
11513  /// \param AppendArgsLoc The Location of an 'append_args' clause.
11514  /// \param SR The SourceRange of the 'declare variant' directive.
11516  FunctionDecl *FD, Expr *VariantRef, OMPTraitInfo &TI,
11517  ArrayRef<Expr *> AdjustArgsNothing,
11518  ArrayRef<Expr *> AdjustArgsNeedDevicePtr,
11520  SourceLocation AdjustArgsLoc, SourceLocation AppendArgsLoc,
11521  SourceRange SR);
11522 
11524  Expr *Expr,
11525  SourceLocation StartLoc,
11526  SourceLocation LParenLoc,
11527  SourceLocation EndLoc);
11528  /// Called on well-formed 'allocator' clause.
11530  SourceLocation StartLoc,
11531  SourceLocation LParenLoc,
11532  SourceLocation EndLoc);
11533  /// Called on well-formed 'if' clause.
11535  Expr *Condition, SourceLocation StartLoc,
11536  SourceLocation LParenLoc,
11537  SourceLocation NameModifierLoc,
11538  SourceLocation ColonLoc,
11539  SourceLocation EndLoc);
11540  /// Called on well-formed 'final' clause.
11541  OMPClause *ActOnOpenMPFinalClause(Expr *Condition, SourceLocation StartLoc,
11542  SourceLocation LParenLoc,
11543  SourceLocation EndLoc);
11544  /// Called on well-formed 'num_threads' clause.
11546  SourceLocation StartLoc,
11547  SourceLocation LParenLoc,
11548  SourceLocation EndLoc);
11549  /// Called on well-formed 'align' clause.
11550  OMPClause *ActOnOpenMPAlignClause(Expr *Alignment, SourceLocation StartLoc,
11551  SourceLocation LParenLoc,
11552  SourceLocation EndLoc);
11553  /// Called on well-formed 'safelen' clause.
11555  SourceLocation StartLoc,
11556  SourceLocation LParenLoc,
11557  SourceLocation EndLoc);
11558  /// Called on well-formed 'simdlen' clause.
11560  SourceLocation LParenLoc,
11561  SourceLocation EndLoc);
11562  /// Called on well-form 'sizes' clause.
11564  SourceLocation StartLoc,
11565  SourceLocation LParenLoc,
11566  SourceLocation EndLoc);
11567  /// Called on well-form 'full' clauses.
11569  SourceLocation EndLoc);
11570  /// Called on well-form 'partial' clauses.
11571  OMPClause *ActOnOpenMPPartialClause(Expr *FactorExpr, SourceLocation StartLoc,
11572  SourceLocation LParenLoc,
11573  SourceLocation EndLoc);
11574  /// Called on well-formed 'collapse' clause.
11576  SourceLocation StartLoc,
11577  SourceLocation LParenLoc,
11578  SourceLocation EndLoc);
11579  /// Called on well-formed 'ordered' clause.
11580  OMPClause *
11582  SourceLocation LParenLoc = SourceLocation(),
11583  Expr *NumForLoops = nullptr);
11584  /// Called on well-formed 'grainsize' clause.
11586  SourceLocation LParenLoc,
11587  SourceLocation EndLoc);
11588  /// Called on well-formed 'num_tasks' clause.
11590  SourceLocation LParenLoc,
11591  SourceLocation EndLoc);
11592  /// Called on well-formed 'hint' clause.
11594  SourceLocation LParenLoc,
11595  SourceLocation EndLoc);
11596  /// Called on well-formed 'detach' clause.
11598  SourceLocation LParenLoc,
11599  SourceLocation EndLoc);
11600 
11602  unsigned Argument,
11603  SourceLocation ArgumentLoc,
11604  SourceLocation StartLoc,
11605  SourceLocation LParenLoc,
11606  SourceLocation EndLoc);
11607  /// Called on well-formed 'when' clause.
11609  SourceLocation LParenLoc,
11610  SourceLocation EndLoc);
11611  /// Called on well-formed 'default' clause.
11612  OMPClause *ActOnOpenMPDefaultClause(llvm::omp::DefaultKind Kind,
11613  SourceLocation KindLoc,
11614  SourceLocation StartLoc,
11615  SourceLocation LParenLoc,
11616  SourceLocation EndLoc);
11617  /// Called on well-formed 'proc_bind' clause.
11618  OMPClause *ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind,
11619  SourceLocation KindLoc,
11620  SourceLocation StartLoc,
11621  SourceLocation LParenLoc,
11622  SourceLocation EndLoc);
11623  /// Called on well-formed 'order' clause.
11625  SourceLocation KindLoc,
11626  SourceLocation StartLoc,
11627  SourceLocation LParenLoc,
11628  SourceLocation EndLoc);
11629  /// Called on well-formed 'update' clause.
11631  SourceLocation KindLoc,
11632  SourceLocation StartLoc,
11633  SourceLocation LParenLoc,
11634  SourceLocation EndLoc);
11635 
11638  SourceLocation StartLoc, SourceLocation LParenLoc,
11639  ArrayRef<SourceLocation> ArgumentsLoc, SourceLocation DelimLoc,
11640  SourceLocation EndLoc);
11641  /// Called on well-formed 'schedule' clause.
11644  OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc,
11645  SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc,
11646  SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc);
11647 
11649  SourceLocation EndLoc);
11650  /// Called on well-formed 'nowait' clause.
11652  SourceLocation EndLoc);
11653  /// Called on well-formed 'untied' clause.
11655  SourceLocation EndLoc);
11656  /// Called on well-formed 'mergeable' clause.
11658  SourceLocation EndLoc);
11659  /// Called on well-formed 'read' clause.
11661  SourceLocation EndLoc);
11662  /// Called on well-formed 'write' clause.
11664  SourceLocation EndLoc);
11665  /// Called on well-formed 'update' clause.
11667  SourceLocation EndLoc);
11668  /// Called on well-formed 'capture' clause.
11670  SourceLocation EndLoc);
11671  /// Called on well-formed 'compare' clause.
11673  SourceLocation EndLoc);
11674  /// Called on well-formed 'seq_cst' clause.
11676  SourceLocation EndLoc);
11677  /// Called on well-formed 'acq_rel' clause.
11679  SourceLocation EndLoc);
11680  /// Called on well-formed 'acquire' clause.
11682  SourceLocation EndLoc);
11683  /// Called on well-formed 'release' clause.
11685  SourceLocation EndLoc);
11686  /// Called on well-formed 'relaxed' clause.
11688  SourceLocation EndLoc);
11689 
11690  /// Called on well-formed 'init' clause.
11691  OMPClause *ActOnOpenMPInitClause(Expr *InteropVar, ArrayRef<Expr *> PrefExprs,
11692  bool IsTarget, bool IsTargetSync,
11693  SourceLocation StartLoc,
11694  SourceLocation LParenLoc,
11695  SourceLocation VarLoc,
11696  SourceLocation EndLoc);
11697 
11698  /// Called on well-formed 'use' clause.
11699  OMPClause *ActOnOpenMPUseClause(Expr *InteropVar, SourceLocation StartLoc,
11700  SourceLocation LParenLoc,
11701  SourceLocation VarLoc, SourceLocation EndLoc);
11702 
11703  /// Called on well-formed 'destroy' clause.
11704  OMPClause *ActOnOpenMPDestroyClause(Expr *InteropVar, SourceLocation StartLoc,
11705  SourceLocation LParenLoc,
11706  SourceLocation VarLoc,
11707  SourceLocation EndLoc);
11708  /// Called on well-formed 'novariants' clause.
11710  SourceLocation StartLoc,
11711  SourceLocation LParenLoc,
11712  SourceLocation EndLoc);
11713  /// Called on well-formed 'nocontext' clause.
11715  SourceLocation StartLoc,
11716  SourceLocation LParenLoc,
11717  SourceLocation EndLoc);
11718  /// Called on well-formed 'filter' clause.
11720  SourceLocation LParenLoc,
11721  SourceLocation EndLoc);
11722  /// Called on well-formed 'threads' clause.
11724  SourceLocation EndLoc);
11725  /// Called on well-formed 'simd' clause.
11727  SourceLocation EndLoc);
11728  /// Called on well-formed 'nogroup' clause.
11730  SourceLocation EndLoc);
11731  /// Called on well-formed 'unified_address' clause.
11733  SourceLocation EndLoc);
11734 
11735  /// Called on well-formed 'unified_address' clause.
11737  SourceLocation EndLoc);
11738 
11739  /// Called on well-formed 'reverse_offload' clause.
11741  SourceLocation EndLoc);
11742 
11743  /// Called on well-formed 'dynamic_allocators' clause.
11745  SourceLocation EndLoc);
11746 
11747  /// Called on well-formed 'atomic_default_mem_order' clause.
11750  SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
11751 
11753  OpenMPClauseKind Kind, ArrayRef<Expr *> Vars, Expr *DepModOrTailExpr,
11754  const OMPVarListLocTy &Locs, SourceLocation ColonLoc,
11755  CXXScopeSpec &ReductionOrMapperIdScopeSpec,
11756  DeclarationNameInfo &ReductionOrMapperId, int ExtraModifier,
11757  ArrayRef<OpenMPMapModifierKind> MapTypeModifiers,
11758  ArrayRef<SourceLocation> MapTypeModifiersLoc, bool IsMapTypeImplicit,
11759  SourceLocation ExtraModifierLoc,
11760  ArrayRef<OpenMPMotionModifierKind> MotionModifiers,
11761  ArrayRef<SourceLocation> MotionModifiersLoc);
11762  /// Called on well-formed 'inclusive' clause.
11764  SourceLocation StartLoc,
11765  SourceLocation LParenLoc,
11766  SourceLocation EndLoc);
11767  /// Called on well-formed 'exclusive' clause.
11769  SourceLocation StartLoc,
11770  SourceLocation LParenLoc,
11771  SourceLocation EndLoc);
11772  /// Called on well-formed 'allocate' clause.
11773  OMPClause *
11774  ActOnOpenMPAllocateClause(Expr *Allocator, ArrayRef<Expr *> VarList,
11775  SourceLocation StartLoc, SourceLocation ColonLoc,
11776  SourceLocation LParenLoc, SourceLocation EndLoc);
11777  /// Called on well-formed 'private' clause.
11779  SourceLocation StartLoc,
11780  SourceLocation LParenLoc,
11781  SourceLocation EndLoc);
11782  /// Called on well-formed 'firstprivate' clause.
11784  SourceLocation StartLoc,
11785  SourceLocation LParenLoc,
11786  SourceLocation EndLoc);
11787  /// Called on well-formed 'lastprivate' clause.
11790  SourceLocation LPKindLoc, SourceLocation ColonLoc,
11791  SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc);
11792  /// Called on well-formed 'shared' clause.
11794  SourceLocation StartLoc,
11795  SourceLocation LParenLoc,
11796  SourceLocation EndLoc);
11797  /// Called on well-formed 'reduction' clause.
11800  SourceLocation StartLoc, SourceLocation LParenLoc,
11801  SourceLocation ModifierLoc, SourceLocation ColonLoc,
11802  SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec,
11803  const DeclarationNameInfo &ReductionId,
11804  ArrayRef<Expr *> UnresolvedReductions = llvm::None);
11805  /// Called on well-formed 'task_reduction' clause.
11807  ArrayRef<Expr *> VarList, SourceLocation StartLoc,
11808  SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
11809  CXXScopeSpec &ReductionIdScopeSpec,
11810  const DeclarationNameInfo &ReductionId,
11811  ArrayRef<Expr *> UnresolvedReductions = llvm::None);
11812  /// Called on well-formed 'in_reduction' clause.
11814  ArrayRef<Expr *> VarList, SourceLocation StartLoc,
11815  SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc,
11816  CXXScopeSpec &ReductionIdScopeSpec,
11817  const DeclarationNameInfo &ReductionId,
11818  ArrayRef<Expr *> UnresolvedReductions = llvm::None);
11819  /// Called on well-formed 'linear' clause.
11820  OMPClause *
11822  SourceLocation StartLoc, SourceLocation LParenLoc,
11823  OpenMPLinearClauseKind LinKind, SourceLocation LinLoc,
11824  SourceLocation ColonLoc, SourceLocation EndLoc);
11825  /// Called on well-formed 'aligned' clause.
11827  Expr *Alignment,
11828  SourceLocation StartLoc,
11829  SourceLocation LParenLoc,
11830  SourceLocation ColonLoc,
11831  SourceLocation EndLoc);
11832  /// Called on well-formed 'copyin' clause.
11834  SourceLocation StartLoc,
11835  SourceLocation LParenLoc,
11836  SourceLocation EndLoc);
11837  /// Called on well-formed 'copyprivate' clause.
11839  SourceLocation StartLoc,
11840  SourceLocation LParenLoc,
11841  SourceLocation EndLoc);
11842  /// Called on well-formed 'flush' pseudo clause.
11844  SourceLocation StartLoc,
11845  SourceLocation LParenLoc,
11846  SourceLocation EndLoc);
11847  /// Called on well-formed 'depobj' pseudo clause.
11849  SourceLocation LParenLoc,
11850  SourceLocation EndLoc);
11851  /// Called on well-formed 'depend' clause.
11852  OMPClause *
11853  ActOnOpenMPDependClause(Expr *DepModifier, OpenMPDependClauseKind DepKind,
11854  SourceLocation DepLoc, SourceLocation ColonLoc,
11855  ArrayRef<Expr *> VarList, SourceLocation StartLoc,
11856  SourceLocation LParenLoc, SourceLocation EndLoc);
11857  /// Called on well-formed 'device' clause.
11859  Expr *Device, SourceLocation StartLoc,
11860  SourceLocation LParenLoc,
11861  SourceLocation ModifierLoc,
11862  SourceLocation EndLoc);
11863  /// Called on well-formed 'map' clause.
11865  ArrayRef<OpenMPMapModifierKind> MapTypeModifiers,
11866  ArrayRef<SourceLocation> MapTypeModifiersLoc,
11867  CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId,
11868  OpenMPMapClauseKind MapType, bool IsMapTypeImplicit,
11869  SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef<Expr *> VarList,
11870  const OMPVarListLocTy &Locs, bool NoDiagnose = false,
11871  ArrayRef<Expr *> UnresolvedMappers = llvm::None);
11872  /// Called on well-formed 'num_teams' clause.
11874  SourceLocation LParenLoc,
11875  SourceLocation EndLoc);
11876  /// Called on well-formed 'thread_limit' clause.
11878  SourceLocation StartLoc,
11879  SourceLocation LParenLoc,
11880  SourceLocation EndLoc);
11881  /// Called on well-formed 'priority' clause.
11883  SourceLocation LParenLoc,
11884  SourceLocation EndLoc);
11885  /// Called on well-formed 'dist_schedule' clause.
11888  SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc,
11889  SourceLocation CommaLoc, SourceLocation EndLoc);
11890  /// Called on well-formed 'defaultmap' clause.
11893  SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc,
11894  SourceLocation KindLoc, SourceLocation EndLoc);
11895  /// Called on well-formed 'to' clause.
11896  OMPClause *
11898  ArrayRef<SourceLocation> MotionModifiersLoc,
11899  CXXScopeSpec &MapperIdScopeSpec,
11900  DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
11901  ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
11902  ArrayRef<Expr *> UnresolvedMappers = llvm::None);
11903  /// Called on well-formed 'from' clause.
11904  OMPClause *
11906  ArrayRef<SourceLocation> MotionModifiersLoc,
11907  CXXScopeSpec &MapperIdScopeSpec,
11908  DeclarationNameInfo &MapperId, SourceLocation ColonLoc,
11909  ArrayRef<Expr *> VarList, const OMPVarListLocTy &Locs,
11910  ArrayRef<Expr *> UnresolvedMappers = llvm::None);
11911  /// Called on well-formed 'use_device_ptr' clause.
11913  const OMPVarListLocTy &Locs);
11914  /// Called on well-formed 'use_device_addr' clause.
11916  const OMPVarListLocTy &Locs);
11917  /// Called on well-formed 'is_device_ptr' clause.
11919  const OMPVarListLocTy &Locs);
11920  /// Called on well-formed 'nontemporal' clause.
11922  SourceLocation StartLoc,
11923  SourceLocation LParenLoc,
11924  SourceLocation EndLoc);
11925 
11926  /// Data for list of allocators.
11928  /// Allocator.
11929  Expr *Allocator = nullptr;
11930  /// Allocator traits.
11931  Expr *AllocatorTraits = nullptr;
11932  /// Locations of '(' and ')' symbols.
11934  };
11935  /// Called on well-formed 'uses_allocators' clause.
11937  SourceLocation LParenLoc,
11938  SourceLocation EndLoc,
11940  /// Called on well-formed 'affinity' clause.
11942  SourceLocation LParenLoc,
11943  SourceLocation ColonLoc,
11944  SourceLocation EndLoc, Expr *Modifier,
11945  ArrayRef<Expr *> Locators);
11946  /// Called on a well-formed 'bind' clause.
11948  SourceLocation KindLoc,
11949  SourceLocation StartLoc,
11950  SourceLocation LParenLoc,
11951  SourceLocation EndLoc);
11952 
11953  /// The kind of conversion being performed.
11955  /// An implicit conversion.
11957  /// A C-style cast.
11959  /// A functional-style cast.
11961  /// A cast other than a C-style cast.
11963  /// A conversion for an operand of a builtin overloaded operator.
11965  };
11966 
11967  static bool isCast(CheckedConversionKind CCK) {
11968  return CCK == CCK_CStyleCast || CCK == CCK_FunctionalCast ||
11969  CCK == CCK_OtherCast;
11970  }
11971 
11972  /// ImpCastExprToType - If Expr is not of type 'Type', insert an implicit
11973  /// cast. If there is already an implicit cast, merge into the existing one.
11974  /// If isLvalue, the result of the cast is an lvalue.
11975  ExprResult
11978  const CXXCastPath *BasePath = nullptr,
11980 
11981  /// ScalarTypeToBooleanCastKind - Returns the cast kind corresponding
11982  /// to the conversion from scalar type ScalarTy to the Boolean type.
11984 
11985  /// IgnoredValueConversions - Given that an expression's result is
11986  /// syntactically ignored, perform any conversions that are
11987  /// required.
11989 
11990  // UsualUnaryConversions - promotes integers (C99 6.3.1.1p2) and converts
11991  // functions and arrays to their respective pointers (C99 6.3.2.1).
11993 
11994  /// CallExprUnaryConversions - a special case of an unary conversion
11995  /// performed on a function designator of a call expression.
11997 
11998  // DefaultFunctionArrayConversion - converts functions and arrays
11999  // to their respective pointers (C99 6.3.2.1).
12000  ExprResult DefaultFunctionArrayConversion(Expr *E, bool Diagnose = true);
12001 
12002  // DefaultFunctionArrayLvalueConversion - converts functions and
12003  // arrays to their respective pointers and performs the
12004  // lvalue-to-rvalue conversion.
12006  bool Diagnose = true);
12007 
12008  // DefaultLvalueConversion - performs lvalue-to-rvalue conversion on
12009  // the operand. This function is a no-op if the operand has a function type
12010  // or an array type.
12012 
12013  // DefaultArgumentPromotion (C99 6.5.2.2p6). Used for function calls that
12014  // do not have a prototype. Integer promotions are performed on each
12015  // argument, and arguments that have type float are promoted to double.
12017 
12018  /// If \p E is a prvalue denoting an unmaterialized temporary, materialize
12019  /// it as an xvalue. In C++98, the result will still be a prvalue, because
12020  /// we don't have xvalues there.
12022 
12023  // Used for emitting the right warning by DefaultVariadicArgumentPromotion
12030  };
12031 
12033  const FunctionProtoType *Proto,
12034  Expr *Fn);
12035 
12036  // Used for determining in which context a type is allowed to be passed to a
12037  // vararg function.
12038  enum VarArgKind {
12044  };
12045 
12046  // Determines which VarArgKind fits an expression.
12048 
12049  /// Check to see if the given expression is a valid argument to a variadic
12050  /// function, issuing a diagnostic if not.
12051  void checkVariadicArgument(const Expr *E, VariadicCallType CT);
12052 
12053  /// Check whether the given statement can have musttail applied to it,
12054  /// issuing a diagnostic and returning false if not. In the success case,
12055  /// the statement is rewritten to remove implicit nodes from the return
12056  /// value.
12057  bool checkAndRewriteMustTailAttr(Stmt *St, const Attr &MTA);
12058 
12059 private:
12060  /// Check whether the given statement can have musttail applied to it,
12061  /// issuing a diagnostic and returning false if not.
12062  bool checkMustTailAttr(const Stmt *St, const Attr &MTA);
12063 
12064 public:
12065  /// Check to see if a given expression could have '.c_str()' called on it.
12066  bool hasCStrMethod(const Expr *E);
12067 
12068  /// GatherArgumentsForCall - Collector argument expressions for various
12069  /// form of call prototypes.
12070  bool GatherArgumentsForCall(SourceLocation CallLoc, FunctionDecl *FDecl,
12071  const FunctionProtoType *Proto,
12072  unsigned FirstParam, ArrayRef<Expr *> Args,
12073  SmallVectorImpl<Expr *> &AllArgs,
12075  bool AllowExplicit = false,
12076  bool IsListInitialization = false);
12077 
12078  // DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but
12079  // will create a runtime trap if the resulting type is not a POD type.
12081  FunctionDecl *FDecl);
12082 
12083  /// Context in which we're performing a usual arithmetic conversion.
12085  /// An arithmetic operation.
12087  /// A bitwise operation.
12089  /// A comparison.
12091  /// A conditional (?:) operator.
12093  /// A compound assignment expression.
12095  };
12096 
12097  // UsualArithmeticConversions - performs the UsualUnaryConversions on it's
12098  // operands and then handles various conversions that are common to binary
12099  // operators (C99 6.3.1.8). If both operands aren't arithmetic, this
12100  // routine returns the first non-arithmetic type found. The client is
12101  // responsible for emitting appropriate error diagnostics.
12103  SourceLocation Loc, ArithConvKind ACK);
12104 
12105  /// AssignConvertType - All of the 'assignment' semantic checks return this
12106  /// enum to indicate whether the assignment was allowed. These checks are
12107  /// done for simple assignments, as well as initialization, return from
12108  /// function, argument passing, etc. The query is phrased in terms of a
12109  /// source and destination type.
12111  /// Compatible - the types are compatible according to the standard.
12113 
12114  /// PointerToInt - The assignment converts a pointer to an int, which we
12115  /// accept as an extension.
12117 
12118  /// IntToPointer - The assignment converts an int to a pointer, which we
12119  /// accept as an extension.
12121 
12122  /// FunctionVoidPointer - The assignment is between a function pointer and
12123  /// void*, which the standard doesn't allow, but we accept as an extension.
12125 
12126  /// IncompatiblePointer - The assignment is between two pointers types that
12127  /// are not compatible, but we accept them as an extension.
12129 
12130  /// IncompatibleFunctionPointer - The assignment is between two function
12131  /// pointers types that are not compatible, but we accept them as an
12132  /// extension.
12134 
12135  /// IncompatiblePointerSign - The assignment is between two pointers types
12136  /// which point to integers which have a different sign, but are otherwise
12137  /// identical. This is a subset of the above, but broken out because it's by
12138  /// far the most common case of incompatible pointers.
12140 
12141  /// CompatiblePointerDiscardsQualifiers - The assignment discards
12142  /// c/v/r qualifiers, which we accept as an extension.
12144 
12145  /// IncompatiblePointerDiscardsQualifiers - The assignment
12146  /// discards qualifiers that we don't permit to be discarded,
12147  /// like address spaces.
12149 
12150  /// IncompatibleNestedPointerAddressSpaceMismatch - The assignment
12151  /// changes address spaces in nested pointer types which is not allowed.
12152  /// For instance, converting __private int ** to __generic int ** is
12153  /// illegal even though __private could be converted to __generic.
12155 
12156  /// IncompatibleNestedPointerQualifiers - The assignment is between two
12157  /// nested pointer types, and the qualifiers other than the first two
12158  /// levels differ e.g. char ** -> const char **, but we accept them as an
12159  /// extension.
12161 
12162  /// IncompatibleVectors - The assignment is between two vector types that
12163  /// have the same size, which we accept as an extension.
12165 
12166  /// IntToBlockPointer - The assignment converts an int to a block
12167  /// pointer. We disallow this.
12169 
12170  /// IncompatibleBlockPointer - The assignment is between two block
12171  /// pointers types that are not compatible.
12173 
12174  /// IncompatibleObjCQualifiedId - The assignment is between a qualified
12175  /// id type and something else (that is incompatible with it). For example,
12176  /// "id <XXX>" = "Foo *", where "Foo *" doesn't implement the XXX protocol.
12178 
12179  /// IncompatibleObjCWeakRef - Assigning a weak-unavailable object to an
12180  /// object with __weak qualifier.
12182 
12183  /// Incompatible - We reject this conversion outright, it is invalid to
12184  /// represent it in the AST.
12186  };
12187 
12188  /// DiagnoseAssignmentResult - Emit a diagnostic, if required, for the
12189  /// assignment conversion type specified by ConvTy. This returns true if the
12190  /// conversion was invalid or false if the conversion was accepted.
12192  SourceLocation Loc,
12193  QualType DstType, QualType SrcType,
12194  Expr *SrcExpr, AssignmentAction Action,
12195  bool *Complained = nullptr);
12196 
12197  /// IsValueInFlagEnum - Determine if a value is allowed as part of a flag
12198  /// enum. If AllowMask is true, then we also allow the complement of a valid
12199  /// value, to be used as a mask.
12200  bool IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val,
12201  bool AllowMask) const;
12202 
12203  /// DiagnoseAssignmentEnum - Warn if assignment to enum is a constant
12204  /// integer not in the range of enum values.
12205  void DiagnoseAssignmentEnum(QualType DstType, QualType SrcType,
12206  Expr *SrcExpr);
12207 
12208  /// CheckAssignmentConstraints - Perform type checking for assignment,
12209  /// argument passing, variable initialization, and function return values.
12210  /// C99 6.5.16.
12212  QualType LHSType,
12213  QualType RHSType);
12214 
12215  /// Check assignment constraints and optionally prepare for a conversion of
12216  /// the RHS to the LHS type. The conversion is prepared for if ConvertRHS
12217  /// is true.
12219  ExprResult &RHS,
12220  CastKind &Kind,
12221  bool ConvertRHS = true);
12222 
12223  /// Check assignment constraints for an assignment of RHS to LHSType.
12224  ///
12225  /// \param LHSType The destination type for the assignment.
12226  /// \param RHS The source expression for the assignment.
12227  /// \param Diagnose If \c true, diagnostics may be produced when checking
12228  /// for assignability. If a diagnostic is produced, \p RHS will be
12229  /// set to ExprError(). Note that this function may still return
12230  /// without producing a diagnostic, even for an invalid assignment.
12231  /// \param DiagnoseCFAudited If \c true, the target is a function parameter
12232  /// in an audited Core Foundation API and does not need to be checked
12233  /// for ARC retain issues.
12234  /// \param ConvertRHS If \c true, \p RHS will be updated to model the
12235  /// conversions necessary to perform the assignment. If \c false,
12236  /// \p Diagnose must also be \c false.
12238  QualType LHSType, ExprResult &RHS, bool Diagnose = true,
12239  bool DiagnoseCFAudited = false, bool ConvertRHS = true);
12240 
12241  // If the lhs type is a transparent union, check whether we
12242  // can initialize the transparent union with the given expression.
12244  ExprResult &RHS);
12245 
12247 
12248  bool CheckExceptionSpecCompatibility(Expr *From, QualType ToType);
12249 
12251  AssignmentAction Action,
12252  bool AllowExplicit = false);
12254  const ImplicitConversionSequence& ICS,
12255  AssignmentAction Action,
12259  const StandardConversionSequence& SCS,
12260  AssignmentAction Action,
12261  CheckedConversionKind CCK);
12262 
12264  Expr *E, QualType Ty, ExprValueKind VK = VK_PRValue,
12266 
12267  /// the following "Check" methods will return a valid/converted QualType
12268  /// or a null QualType (indicating an error diagnostic was issued).
12269 
12270  /// type checking binary operators (subroutines of CreateBuiltinBinOp).
12272  ExprResult &RHS);
12274  ExprResult &RHS);
12276  ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK,
12277  SourceLocation OpLoc, bool isIndirect);
12279  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign,
12280  bool IsDivide);
12281  QualType CheckRemainderOperands( // C99 6.5.5
12282  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12283  bool IsCompAssign = false);
12284  QualType CheckAdditionOperands( // C99 6.5.6
12285  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12286  BinaryOperatorKind Opc, QualType* CompLHSTy = nullptr);
12287  QualType CheckSubtractionOperands( // C99 6.5.6
12288  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12289  QualType* CompLHSTy = nullptr);
12290  QualType CheckShiftOperands( // C99 6.5.7
12291  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12292  BinaryOperatorKind Opc, bool IsCompAssign = false);
12294  QualType CheckCompareOperands( // C99 6.5.8/9
12295  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12296  BinaryOperatorKind Opc);
12297  QualType CheckBitwiseOperands( // C99 6.5.[10...12]
12298  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12299  BinaryOperatorKind Opc);
12300  QualType CheckLogicalOperands( // C99 6.5.[13,14]
12301  ExprResult &LHS, ExprResult &RHS, SourceLocation Loc,
12302  BinaryOperatorKind Opc);
12303  // CheckAssignmentOperands is used for both simple and compound assignment.
12304  // For simple assignment, pass both expressions and a null converted type.
12305  // For compound assignment, pass both expressions and the converted type.
12306  QualType CheckAssignmentOperands( // C99 6.5.16.[1,2]
12307  Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType);
12308 
12313  Expr *LHS, Expr *RHS);
12316 
12317  QualType CheckConditionalOperands( // C99 6.5.15
12318  ExprResult &Cond, ExprResult &LHS, ExprResult &RHS,
12319  ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc);
12321  ExprResult &cond, ExprResult &lhs, ExprResult &rhs,
12322  ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc);
12324  ExprResult &RHS,
12325  SourceLocation QuestionLoc);
12327  bool ConvertArgs = true);
12329  ExprResult &E1, ExprResult &E2,
12330  bool ConvertArgs = true) {
12331  Expr *E1Tmp = E1.get(), *E2Tmp = E2.get();
12332  QualType Composite =
12333  FindCompositePointerType(Loc, E1Tmp, E2Tmp, ConvertArgs);
12334  E1 = E1Tmp;
12335  E2 = E2Tmp;
12336  return Composite;
12337  }
12338 
12340  SourceLocation QuestionLoc);
12341 
12342  bool DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr,
12343  SourceLocation QuestionLoc);
12344 
12347  bool IsEqual, SourceRange Range);
12348 
12349  /// type checking for vector binary operators.
12351  SourceLocation Loc, bool IsCompAssign,
12352  bool AllowBothBool, bool AllowBoolConversion,
12353  bool AllowBoolOperation, bool ReportInvalid);
12356  SourceLocation Loc,
12357  BinaryOperatorKind Opc);
12359  SourceLocation Loc);
12360 
12361  // type checking for sizeless vector binary operators.
12363  SourceLocation Loc, bool IsCompAssign,
12364  ArithConvKind OperationKind);
12365 
12366  /// Type checking for matrix binary operators.
12368  SourceLocation Loc,
12369  bool IsCompAssign);
12371  SourceLocation Loc, bool IsCompAssign);
12372 
12373  bool isValidSveBitcast(QualType srcType, QualType destType);
12374 
12376 
12377  bool areVectorTypesSameSize(QualType srcType, QualType destType);
12378  bool areLaxCompatibleVectorTypes(QualType srcType, QualType destType);
12379  bool isLaxVectorConversion(QualType srcType, QualType destType);
12380 
12381  /// type checking declaration initializers (C99 6.7.8)
12383 
12384  // type checking C++ declaration initializers (C++ [dcl.init]).
12385 
12386  /// ReferenceCompareResult - Expresses the result of comparing two
12387  /// types (cv1 T1 and cv2 T2) to determine their compatibility for the
12388  /// purposes of initialization by reference (C++ [dcl.init.ref]p4).
12390  /// Ref_Incompatible - The two types are incompatible, so direct
12391  /// reference binding is not possible.
12393  /// Ref_Related - The two types are reference-related, which means
12394  /// that their unqualified forms (T1 and T2) are either the same
12395  /// or T1 is a base class of T2.
12397  /// Ref_Compatible - The two types are reference-compatible.
12399  };
12400 
12401  // Fake up a scoped enumeration that still contextually converts to bool.
12403  /// The conversions that would be performed on an lvalue of type T2 when
12404  /// binding a reference of type T1 to it, as determined when evaluating
12405  /// whether T1 is reference-compatible with T2.
12409  Function = 0x4,
12411  ObjC = 0x10,
12413 
12414  LLVM_MARK_AS_BITMASK_ENUM(/*LargestValue=*/ObjCLifetime)
12415  };
12416  };
12418 
12421  ReferenceConversions *Conv = nullptr);
12422 
12425  ExprValueKind &VK, CXXCastPath &Path);
12426 
12427  /// Force an expression with unknown-type to an expression of the
12428  /// given type.
12430 
12431  /// Type-check an expression that's being passed to an
12432  /// __unknown_anytype parameter.
12434  Expr *result, QualType &paramType);
12435 
12436  // CheckMatrixCast - Check type constraints for matrix casts.
12437  // We allow casting between matrixes of the same dimensions i.e. when they
12438  // have the same number of rows and column. Returns true if the cast is
12439  // invalid.
12440  bool CheckMatrixCast(SourceRange R, QualType DestTy, QualType SrcTy,
12441  CastKind &Kind);
12442 
12443  // CheckVectorCast - check type constraints for vectors.
12444  // Since vectors are an extension, there are no C standard reference for this.
12445  // We allow casting between vectors and integer datatypes of the same size.
12446  // returns true if the cast is invalid
12447  bool CheckVectorCast(SourceRange R, QualType VectorTy, QualType Ty,
12448  CastKind &Kind);
12449 
12450  /// Prepare `SplattedExpr` for a vector splat operation, adding
12451  /// implicit casts if necessary.
12452  ExprResult prepareVectorSplat(QualType VectorTy, Expr *SplattedExpr);
12453 
12454  // CheckExtVectorCast - check type constraints for extended vectors.
12455  // Since vectors are an extension, there are no C standard reference for this.
12456  // We allow casting between vectors and integer datatypes of the same size,
12457  // or vectors and the element type of that vector.
12458  // returns the cast expr
12460  CastKind &Kind);
12461 
12463  SourceLocation LParenLoc,
12464  Expr *CastExpr,
12465  SourceLocation RParenLoc);
12466 
12468 
12469  /// Checks for invalid conversions and casts between
12470  /// retainable pointers and other pointer kinds for ARC and Weak.
12472  QualType castType, Expr *&op,
12474  bool Diagnose = true,
12475  bool DiagnoseCFAudited = false,
12476  BinaryOperatorKind Opc = BO_PtrMemD
12477  );
12478 
12480  void diagnoseARCUnbridgedCast(Expr *e);
12481 
12483  QualType ExprType);
12484 
12485  /// checkRetainCycles - Check whether an Objective-C message send
12486  /// might create an obvious retain cycle.
12488  void checkRetainCycles(Expr *receiver, Expr *argument);
12489  void checkRetainCycles(VarDecl *Var, Expr *Init);
12490 
12491  /// checkUnsafeAssigns - Check whether +1 expr is being assigned
12492  /// to weak/__unsafe_unretained type.
12493  bool checkUnsafeAssigns(SourceLocation Loc, QualType LHS, Expr *RHS);
12494 
12495  /// checkUnsafeExprAssigns - Check whether +1 expr is being assigned
12496  /// to weak/__unsafe_unretained expression.
12497  void checkUnsafeExprAssigns(SourceLocation Loc, Expr *LHS, Expr *RHS);
12498 
12499  /// CheckMessageArgumentTypes - Check types in an Obj-C message send.
12500  /// \param Method - May be null.
12501  /// \param [out] ReturnType - The return type of the send.
12502  /// \return true iff there were any incompatible types.
12503  bool CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType,
12504  MultiExprArg Args, Selector Sel,
12505  ArrayRef<SourceLocation> SelectorLocs,
12506  ObjCMethodDecl *Method, bool isClassMessage,
12507  bool isSuperMessage, SourceLocation lbrac,
12508  SourceLocation rbrac, SourceRange RecRange,
12509  QualType &ReturnType, ExprValueKind &VK);
12510 
12511  /// Determine the result of a message send expression based on
12512  /// the type of the receiver, the method expected to receive the message,
12513  /// and the form of the message send.
12514  QualType getMessageSendResultType(const Expr *Receiver, QualType ReceiverType,
12515  ObjCMethodDecl *Method, bool isClassMessage,
12516  bool isSuperMessage);
12517 
12518  /// If the given expression involves a message send to a method
12519  /// with a related result type, emit a note describing what happened.
12520  void EmitRelatedResultTypeNote(const Expr *E);
12521 
12522  /// Given that we had incompatible pointer types in a return
12523  /// statement, check whether we're in a method with a related result
12524  /// type, and if so, emit a note describing what happened.
12526 
12528  Decl *ConditionVar;
12529  FullExprArg Condition;
12530  bool Invalid;
12531  bool HasKnownValue;
12532  bool KnownValue;
12533 
12534  friend class Sema;
12535  ConditionResult(Sema &S, Decl *ConditionVar, FullExprArg Condition,
12536  bool IsConstexpr)
12537  : ConditionVar(ConditionVar), Condition(Condition), Invalid(false),
12538  HasKnownValue(IsConstexpr && Condition.get() &&
12539  !Condition.get()->isValueDependent()),
12540  KnownValue(HasKnownValue &&
12541  !!Condition.get()->EvaluateKnownConstInt(S.Context)) {}
12542  explicit ConditionResult(bool Invalid)
12543  : ConditionVar(nullptr), Condition(nullptr), Invalid(Invalid),
12544  HasKnownValue(false), KnownValue(false) {}
12545 
12546  public:
12548  bool isInvalid() const { return Invalid; }
12549  std::pair<VarDecl *, Expr *> get() const {
12550  return std::make_pair(cast_or_null<VarDecl>(ConditionVar),
12551  Condition.get());
12552  }
12554  if (!HasKnownValue)
12555  return None;
12556  return KnownValue;
12557  }
12558  };
12560 
12561  enum class ConditionKind {
12562  Boolean, ///< A boolean condition, from 'if', 'while', 'for', or 'do'.
12563  ConstexprIf, ///< A constant boolean condition from 'if constexpr'.
12564  Switch ///< An integral condition for a 'switch' statement.
12565  };
12568  }
12569 
12570  ConditionResult ActOnCondition(Scope *S, SourceLocation Loc, Expr *SubExpr,
12571  ConditionKind CK, bool MissingOK = false);
12572 
12573  ConditionResult ActOnConditionVariable(Decl *ConditionVar,
12574  SourceLocation StmtLoc,
12575  ConditionKind CK);
12576 
12578 
12580  SourceLocation StmtLoc,
12581  ConditionKind CK);
12583 
12584  /// CheckBooleanCondition - Diagnose problems involving the use of
12585  /// the given expression as a boolean condition (e.g. in an if
12586  /// statement). Also performs the standard function and array
12587  /// decays, possibly changing the input variable.
12588  ///
12589  /// \param Loc - A location associated with the condition, e.g. the
12590  /// 'if' keyword.
12591  /// \return true iff there were any errors
12593  bool IsConstexpr = false);
12594 
12595  /// ActOnExplicitBoolSpecifier - Build an ExplicitSpecifier from an expression
12596  /// found in an explicit(bool) specifier.
12598 
12599  /// tryResolveExplicitSpecifier - Attempt to resolve the explict specifier.
12600  /// Returns true if the explicit specifier is now resolved.
12601  bool tryResolveExplicitSpecifier(ExplicitSpecifier &ExplicitSpec);
12602 
12603  /// DiagnoseAssignmentAsCondition - Given that an expression is
12604  /// being used as a boolean condition, warn if it's an assignment.
12606 
12607  /// Redundant parentheses over an equality comparison can indicate
12608  /// that the user intended an assignment used as condition.
12610 
12611  /// CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
12612  ExprResult CheckCXXBooleanCondition(Expr *CondExpr, bool IsConstexpr = false);
12613 
12614  /// ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have
12615  /// the specified width and sign. If an overflow occurs, detect it and emit
12616  /// the specified diagnostic.
12618  unsigned NewWidth, bool NewSign,
12619  SourceLocation Loc, unsigned DiagID);
12620 
12621  /// Checks that the Objective-C declaration is declared in the global scope.
12622  /// Emits an error and marks the declaration as invalid if it's not declared
12623  /// in the global scope.
12624  bool CheckObjCDeclScope(Decl *D);
12625 
12626  /// Abstract base class used for diagnosing integer constant
12627  /// expression violations.
12629  public:
12630  bool Suppress;
12631 
12633 
12634  virtual SemaDiagnosticBuilder
12637  SourceLocation Loc) = 0;
12639  virtual ~VerifyICEDiagnoser() {}
12640  };
12641 
12645  };
12646 
12647  /// VerifyIntegerConstantExpression - Verifies that an expression is an ICE,
12648  /// and reports the appropriate diagnostics. Returns false on success.
12649  /// Can optionally return the value of the expression.
12651  VerifyICEDiagnoser &Diagnoser,
12652  AllowFoldKind CanFold = NoFold);
12654  unsigned DiagID,
12655  AllowFoldKind CanFold = NoFold);
12657  llvm::APSInt *Result = nullptr,
12658  AllowFoldKind CanFold = NoFold);
12660  AllowFoldKind CanFold = NoFold) {
12661  return VerifyIntegerConstantExpression(E, nullptr, CanFold);
12662  }
12663 
12664  /// VerifyBitField - verifies that a bit field expression is an ICE and has
12665  /// the correct width, and that the field type is valid.
12666  /// Returns false on success.
12667  /// Can optionally return whether the bit-field is of width 0
12669  QualType FieldTy, bool IsMsStruct,
12670  Expr *BitWidth, bool *ZeroWidth = nullptr);
12671 
12672 private:
12673  unsigned ForceCUDAHostDeviceDepth = 0;
12674 
12675 public:
12676  /// Increments our count of the number of times we've seen a pragma forcing
12677  /// functions to be __host__ __device__. So long as this count is greater
12678  /// than zero, all functions encountered will be __host__ __device__.
12679  void PushForceCUDAHostDevice();
12680 
12681  /// Decrements our count of the number of times we've seen a pragma forcing
12682  /// functions to be __host__ __device__. Returns false if the count is 0
12683  /// before incrementing, so you can emit an error.
12684  bool PopForceCUDAHostDevice();
12685 
12687  public:
12690  : Diagnostic(SL, PD), Reason(R) {}
12691 
12693  DeviceDiagnosticReason getReason() const { return Reason; }
12694 
12695  private:
12697  DeviceDiagnosticReason Reason;
12698  };
12699 
12700  /// Diagnostics that are emitted only if we discover that the given function
12701  /// must be codegen'ed. Because handling these correctly adds overhead to
12702  /// compilation, this is currently only enabled for CUDA compilations.
12703  llvm::DenseMap<CanonicalDeclPtr<FunctionDecl>,
12704  std::vector<DeviceDeferredDiagnostic>>
12706 
12707  /// A pair of a canonical FunctionDecl and a SourceLocation. When used as the
12708  /// key in a hashtable, both the FD and location are hashed.
12712  };
12713 
12714  /// FunctionDecls and SourceLocations for which CheckCUDACall has emitted a
12715  /// (maybe deferred) "bad call" diagnostic. We use this to avoid emitting the
12716  /// same deferred diag twice.
12718 
12719  /// An inverse call graph, mapping known-emitted functions to one of their
12720  /// known-emitted callers (plus the location of the call).
12721  ///
12722  /// Functions that we can tell a priori must be emitted aren't added to this
12723  /// map.
12724  llvm::DenseMap</* Callee = */ CanonicalDeclPtr<FunctionDecl>,
12725  /* Caller = */ FunctionDeclAndLoc>
12727 
12728  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
12729  /// context is "used as device code".
12730  ///
12731  /// - If CurContext is a __host__ function, does not emit any diagnostics
12732  /// unless \p EmitOnBothSides is true.
12733  /// - If CurContext is a __device__ or __global__ function, emits the
12734  /// diagnostics immediately.
12735  /// - If CurContext is a __host__ __device__ function and we are compiling for
12736  /// the device, creates a diagnostic which is emitted if and when we realize
12737  /// that the function will be codegen'ed.
12738  ///
12739  /// Example usage:
12740  ///
12741  /// // Variable-length arrays are not allowed in CUDA device code.
12742  /// if (CUDADiagIfDeviceCode(Loc, diag::err_cuda_vla) << CurrentCUDATarget())
12743  /// return ExprError();
12744  /// // Otherwise, continue parsing as normal.
12746  unsigned DiagID);
12747 
12748  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
12749  /// context is "used as host code".
12750  ///
12751  /// Same as CUDADiagIfDeviceCode, with "host" and "device" switched.
12753 
12754  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
12755  /// context is "used as device code".
12756  ///
12757  /// - If CurContext is a `declare target` function or it is known that the
12758  /// function is emitted for the device, emits the diagnostics immediately.
12759  /// - If CurContext is a non-`declare target` function and we are compiling
12760  /// for the device, creates a diagnostic which is emitted if and when we
12761  /// realize that the function will be codegen'ed.
12762  ///
12763  /// Example usage:
12764  ///
12765  /// // Variable-length arrays are not allowed in NVPTX device code.
12766  /// if (diagIfOpenMPDeviceCode(Loc, diag::err_vla_unsupported))
12767  /// return ExprError();
12768  /// // Otherwise, continue parsing as normal.
12770  diagIfOpenMPDeviceCode(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD);
12771 
12772  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
12773  /// context is "used as host code".
12774  ///
12775  /// - If CurContext is a `declare target` function or it is known that the
12776  /// function is emitted for the host, emits the diagnostics immediately.
12777  /// - If CurContext is a non-host function, just ignore it.
12778  ///
12779  /// Example usage:
12780  ///
12781  /// // Variable-length arrays are not allowed in NVPTX device code.
12782  /// if (diagIfOpenMPHostode(Loc, diag::err_vla_unsupported))
12783  /// return ExprError();
12784  /// // Otherwise, continue parsing as normal.
12786  unsigned DiagID, FunctionDecl *FD);
12787 
12788  SemaDiagnosticBuilder targetDiag(SourceLocation Loc, unsigned DiagID,
12789  FunctionDecl *FD = nullptr);
12791  const PartialDiagnostic &PD,
12792  FunctionDecl *FD = nullptr) {
12793  return targetDiag(Loc, PD.getDiagID(), FD) << PD;
12794  }
12795 
12796  /// Check if the type is allowed to be used for the current target.
12798  ValueDecl *D = nullptr);
12799 
12806  };
12807 
12808  /// Determines whether the given function is a CUDA device/host/kernel/etc.
12809  /// function.
12810  ///
12811  /// Use this rather than examining the function's attributes yourself -- you
12812  /// will get it wrong. Returns CFT_Host if D is null.
12814  bool IgnoreImplicitHDAttr = false);
12816 
12818  CVT_Device, /// Emitted on device side with a shadow variable on host side
12819  CVT_Host, /// Emitted on host side only
12820  CVT_Both, /// Emitted on both sides with different addresses
12821  CVT_Unified, /// Emitted as a unified address, e.g. managed variables
12822  };
12823  /// Determines whether the given variable is emitted on host or device side.
12825 
12826  /// Gets the CUDA target for the current context.
12828  return IdentifyCUDATarget(dyn_cast<FunctionDecl>(CurContext));
12829  }
12830 
12831  static bool isCUDAImplicitHostDeviceFunction(const FunctionDecl *D);
12832 
12833  // CUDA function call preference. Must be ordered numerically from
12834  // worst to best.
12836  CFP_Never, // Invalid caller/callee combination.
12837  CFP_WrongSide, // Calls from host-device to host or device
12838  // function that do not match current compilation
12839  // mode.
12840  CFP_HostDevice, // Any calls to host/device functions.
12841  CFP_SameSide, // Calls from host-device to host or device
12842  // function matching current compilation mode.
12843  CFP_Native, // host-to-host or device-to-device calls.
12844  };
12845 
12846  /// Identifies relative preference of a given Caller/Callee
12847  /// combination, based on their host/device attributes.
12848  /// \param Caller function which needs address of \p Callee.
12849  /// nullptr in case of global context.
12850  /// \param Callee target function
12851  ///
12852  /// \returns preference value for particular Caller/Callee combination.
12854  const FunctionDecl *Callee);
12855 
12856  /// Determines whether Caller may invoke Callee, based on their CUDA
12857  /// host/device attributes. Returns false if the call is not allowed.
12858  ///
12859  /// Note: Will return true for CFP_WrongSide calls. These may appear in
12860  /// semantically correct CUDA programs, but only if they're never codegen'ed.
12861  bool IsAllowedCUDACall(const FunctionDecl *Caller,
12862  const FunctionDecl *Callee) {
12863  return IdentifyCUDAPreference(Caller, Callee) != CFP_Never;
12864  }
12865 
12866  /// May add implicit CUDAHostAttr and CUDADeviceAttr attributes to FD,
12867  /// depending on FD and the current compilation settings.
12869  const LookupResult &Previous);
12870 
12871  /// May add implicit CUDAConstantAttr attribute to VD, depending on VD
12872  /// and current compilation settings.
12874 
12875 public:
12876  /// Check whether we're allowed to call Callee from the current context.
12877  ///
12878  /// - If the call is never allowed in a semantically-correct program
12879  /// (CFP_Never), emits an error and returns false.
12880  ///
12881  /// - If the call is allowed in semantically-correct programs, but only if
12882  /// it's never codegen'ed (CFP_WrongSide), creates a deferred diagnostic to
12883  /// be emitted if and when the caller is codegen'ed, and returns true.
12884  ///
12885  /// Will only create deferred diagnostics for a given SourceLocation once,
12886  /// so you can safely call this multiple times without generating duplicate
12887  /// deferred errors.
12888  ///
12889  /// - Otherwise, returns true without emitting any diagnostics.
12890  bool CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee);
12891 
12893 
12894  /// Set __device__ or __host__ __device__ attributes on the given lambda
12895  /// operator() method.
12896  ///
12897  /// CUDA lambdas by default is host device function unless it has explicit
12898  /// host or device attribute.
12899  void CUDASetLambdaAttrs(CXXMethodDecl *Method);
12900 
12901  /// Finds a function in \p Matches with highest calling priority
12902  /// from \p Caller context and erases all functions with lower
12903  /// calling priority.
12905  const FunctionDecl *Caller,
12906  SmallVectorImpl<std::pair<DeclAccessPair, FunctionDecl *>> &Matches);
12907 
12908  /// Given a implicit special member, infer its CUDA target from the
12909  /// calls it needs to make to underlying base/field special members.
12910  /// \param ClassDecl the class for which the member is being created.
12911  /// \param CSM the kind of special member.
12912  /// \param MemberDecl the special member itself.
12913  /// \param ConstRHS true if this is a copy operation with a const object on
12914  /// its RHS.
12915  /// \param Diagnose true if this call should emit diagnostics.
12916  /// \return true if there was an error inferring.
12917  /// The result of this call is implicit CUDA target attribute(s) attached to
12918  /// the member declaration.
12920  CXXSpecialMember CSM,
12921  CXXMethodDecl *MemberDecl,
12922  bool ConstRHS,
12923  bool Diagnose);
12924 
12925  /// \return true if \p CD can be considered empty according to CUDA
12926  /// (E.2.3.1 in CUDA 7.5 Programming guide).
12929 
12930  // \brief Checks that initializers of \p Var satisfy CUDA restrictions. In
12931  // case of error emits appropriate diagnostic and invalidates \p Var.
12932  //
12933  // \details CUDA allows only empty constructors as initializers for global
12934  // variables (see E.2.3.1, CUDA 7.5). The same restriction also applies to all
12935  // __shared__ variables whether they are local or not (they all are implicitly
12936  // static in CUDA). One exception is that CUDA allows constant initializers
12937  // for __constant__ and __device__ variables.
12939 
12940  /// Check whether NewFD is a valid overload for CUDA. Emits
12941  /// diagnostics and invalidates NewFD if not.
12943  const LookupResult &Previous);
12944  /// Copies target attributes from the template TD to the function FD.
12946 
12947  /// Returns the name of the launch configuration function. This is the name
12948  /// of the function that will be called to configure kernel call, with the
12949  /// parameters specified via <<<>>>.
12951 
12952  /// \name Code completion
12953  //@{
12954  /// Describes the context in which code completion occurs.
12956  /// Code completion occurs at top-level or namespace context.
12958  /// Code completion occurs within a class, struct, or union.
12960  /// Code completion occurs within an Objective-C interface, protocol,
12961  /// or category.
12963  /// Code completion occurs within an Objective-C implementation or
12964  /// category implementation
12966  /// Code completion occurs within the list of instance variables
12967  /// in an Objective-C interface, protocol, category, or implementation.
12969  /// Code completion occurs following one or more template
12970  /// headers.
12972  /// Code completion occurs following one or more template
12973  /// headers within a class.
12975  /// Code completion occurs within an expression.
12977  /// Code completion occurs within a statement, which may
12978  /// also be an expression or a declaration.
12980  /// Code completion occurs at the beginning of the
12981  /// initialization statement (or expression) in a for loop.
12983  /// Code completion occurs within the condition of an if,
12984  /// while, switch, or for statement.
12986  /// Code completion occurs within the body of a function on a
12987  /// recovery path, where we do not have a specific handle on our position
12988  /// in the grammar.
12990  /// Code completion occurs where only a type is permitted.
12992  /// Code completion occurs in a parenthesized expression, which
12993  /// might also be a type cast.
12995  /// Code completion occurs within a sequence of declaration
12996  /// specifiers within a function, method, or block.
12998  };
12999 
13002  ParserCompletionContext CompletionContext);
13003  void CodeCompleteDeclSpec(Scope *S, DeclSpec &DS,
13004  bool AllowNonIdentifiers,
13005  bool AllowNestedNameSpecifiers);
13006 
13007  struct CodeCompleteExpressionData;
13008  void CodeCompleteExpression(Scope *S,
13009  const CodeCompleteExpressionData &Data);
13010  void CodeCompleteExpression(Scope *S, QualType PreferredType,
13011  bool IsParenthesized = false);
13012  void CodeCompleteMemberReferenceExpr(Scope *S, Expr *Base, Expr *OtherOpBase,
13013  SourceLocation OpLoc, bool IsArrow,
13014  bool IsBaseExprStatement,
13015  QualType PreferredType);
13017  QualType PreferredType);
13018  void CodeCompleteTag(Scope *S, unsigned TagSpec);
13021  const VirtSpecifiers *VS = nullptr);
13023  void CodeCompleteCase(Scope *S);
13024  enum class AttributeCompletion {
13025  Attribute,
13026  Scope,
13027  None,
13028  };
13029  void CodeCompleteAttribute(
13032  const IdentifierInfo *Scope = nullptr);
13033  /// Determines the preferred type of the current function argument, by
13034  /// examining the signatures of all possible overloads.
13035  /// Returns null if unknown or ambiguous, or if code completion is off.
13036  ///
13037  /// If the code completion point has been reached, also reports the function
13038  /// signatures that were considered.
13039  ///
13040  /// FIXME: rename to GuessCallArgumentType to reduce confusion.
13042  SourceLocation OpenParLoc);
13044  ArrayRef<Expr *> Args,
13045  SourceLocation OpenParLoc,
13046  bool Braced);
13048  Decl *ConstructorDecl, CXXScopeSpec SS, ParsedType TemplateTypeTy,
13049  ArrayRef<Expr *> ArgExprs, IdentifierInfo *II, SourceLocation OpenParLoc,
13050  bool Braced);
13053  void CodeCompleteInitializer(Scope *S, Decl *D);
13054  /// Trigger code completion for a record of \p BaseType. \p InitExprs are
13055  /// expressions in the initializer list seen so far and \p D is the current
13056  /// Designation being parsed.
13057  void CodeCompleteDesignator(const QualType BaseType,
13058  llvm::ArrayRef<Expr *> InitExprs,
13059  const Designation &D);
13060  void CodeCompleteAfterIf(Scope *S, bool IsBracedThen);
13061 
13062  void CodeCompleteQualifiedId(Scope *S, CXXScopeSpec &SS, bool EnteringContext,
13063  bool IsUsingDeclaration, QualType BaseType,
13064  QualType PreferredType);
13065  void CodeCompleteUsing(Scope *S);
13071  Decl *Constructor,
13072  ArrayRef<CXXCtorInitializer *> Initializers);
13073 
13075  bool AfterAmpersand);
13077 
13086  bool IsParameter);
13089  ArrayRef<IdentifierInfo *> SelIdents,
13090  bool AtArgumentExpression);
13091  void CodeCompleteObjCClassMessage(Scope *S, ParsedType Receiver,
13092  ArrayRef<IdentifierInfo *> SelIdents,
13093  bool AtArgumentExpression,
13094  bool IsSuper = false);
13095  void CodeCompleteObjCInstanceMessage(Scope *S, Expr *Receiver,
13096  ArrayRef<IdentifierInfo *> SelIdents,
13097  bool AtArgumentExpression,
13098  ObjCInterfaceDecl *Super = nullptr);
13100  DeclGroupPtrTy IterationVar);
13102  ArrayRef<IdentifierInfo *> SelIdents);
13104  ArrayRef<IdentifierLocPair> Protocols);
13108  IdentifierInfo *ClassName,
13109  SourceLocation ClassNameLoc);
13112  IdentifierInfo *ClassName,
13113  SourceLocation ClassNameLoc);
13115  IdentifierInfo *ClassName,
13116  SourceLocation ClassNameLoc);
13119  IdentifierInfo *PropertyName);
13120  void CodeCompleteObjCMethodDecl(Scope *S, Optional<bool> IsInstanceMethod,
13121  ParsedType ReturnType);
13123  bool IsInstanceMethod,
13124  bool AtParameterName,
13125  ParsedType ReturnType,
13126  ArrayRef<IdentifierInfo *> SelIdents);
13128  SourceLocation ClassNameLoc,
13129  bool IsBaseExprStatement);
13130  void CodeCompletePreprocessorDirective(bool InConditional);
13132  void CodeCompletePreprocessorMacroName(bool IsDefinition);
13135  IdentifierInfo *Macro,
13137  unsigned Argument);
13138  void CodeCompleteIncludedFile(llvm::StringRef Dir, bool IsAngled);
13142  CodeCompletionTUInfo &CCTUInfo,
13144  //@}
13145 
13146  //===--------------------------------------------------------------------===//
13147  // Extra semantic analysis beyond the C type system
13148 
13149 public:
13151  unsigned ByteNo) const;
13152 
13153 private:
13154  void CheckArrayAccess(const Expr *BaseExpr, const Expr *IndexExpr,
13155  const ArraySubscriptExpr *ASE=nullptr,
13156  bool AllowOnePastEnd=true, bool IndexNegated=false);
13157  void CheckArrayAccess(const Expr *E);
13158  // Used to grab the relevant information from a FormatAttr and a
13159  // FunctionDeclaration.
13160  struct FormatStringInfo {
13161  unsigned FormatIdx;
13162  unsigned FirstDataArg;
13163  bool HasVAListArg;
13164  };
13165 
13166  static bool getFormatStringInfo(const FormatAttr *Format, bool IsCXXMember,
13167  FormatStringInfo *FSI);
13168  bool CheckFunctionCall(FunctionDecl *FDecl, CallExpr *TheCall,
13169  const FunctionProtoType *Proto);
13170  bool CheckObjCMethodCall(ObjCMethodDecl *Method, SourceLocation loc,
13171  ArrayRef<const Expr *> Args);
13172  bool CheckPointerCall(NamedDecl *NDecl, CallExpr *TheCall,
13173  const FunctionProtoType *Proto);
13174  bool CheckOtherCall(CallExpr *TheCall, const FunctionProtoType *Proto);
13175  void CheckConstructorCall(FunctionDecl *FDecl, QualType ThisType,
13176  ArrayRef<const Expr *> Args,
13177  const FunctionProtoType *Proto, SourceLocation Loc);
13178 
13179  void CheckArgAlignment(SourceLocation Loc, NamedDecl *FDecl,
13180  StringRef ParamName, QualType ArgTy, QualType ParamTy);
13181 
13182  void checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto,
13183  const Expr *ThisArg, ArrayRef<const Expr *> Args,
13184  bool IsMemberFunction, SourceLocation Loc, SourceRange Range,
13185  VariadicCallType CallType);
13186 
13187  void CheckSYCLKernelCall(FunctionDecl *CallerFunc, SourceRange CallLoc,
13188  ArrayRef<const Expr *> Args);
13189 
13190  bool CheckObjCString(Expr *Arg);
13191  ExprResult CheckOSLogFormatStringArg(Expr *Arg);
13192 
13193  ExprResult CheckBuiltinFunctionCall(FunctionDecl *FDecl,
13194  unsigned BuiltinID, CallExpr *TheCall);
13195 
13196  bool CheckTSBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13197  CallExpr *TheCall);
13198 
13199  void checkFortifiedBuiltinMemoryFunction(FunctionDecl *FD, CallExpr *TheCall);
13200 
13201  bool CheckARMBuiltinExclusiveCall(unsigned BuiltinID, CallExpr *TheCall,
13202  unsigned MaxWidth);
13203  bool CheckNeonBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13204  CallExpr *TheCall);
13205  bool CheckMVEBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13206  bool CheckSVEBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13207  bool CheckCDEBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13208  CallExpr *TheCall);
13209  bool CheckARMCoprocessorImmediate(const TargetInfo &TI, const Expr *CoprocArg,
13210  bool WantCDE);
13211  bool CheckARMBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13212  CallExpr *TheCall);
13213 
13214  bool CheckAArch64BuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13215  CallExpr *TheCall);
13216  bool CheckBPFBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13217  bool CheckHexagonBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13218  bool CheckHexagonBuiltinArgument(unsigned BuiltinID, CallExpr *TheCall);
13219  bool CheckMipsBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13220  CallExpr *TheCall);
13221  bool CheckMipsBuiltinCpu(const TargetInfo &TI, unsigned BuiltinID,
13222  CallExpr *TheCall);
13223  bool CheckMipsBuiltinArgument(unsigned BuiltinID, CallExpr *TheCall);
13224  bool CheckSystemZBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13225  bool CheckX86BuiltinRoundingOrSAE(unsigned BuiltinID, CallExpr *TheCall);
13226  bool CheckX86BuiltinGatherScatterScale(unsigned BuiltinID, CallExpr *TheCall);
13227  bool CheckX86BuiltinTileArguments(unsigned BuiltinID, CallExpr *TheCall);
13228  bool CheckX86BuiltinTileArgumentsRange(CallExpr *TheCall,
13229  ArrayRef<int> ArgNums);
13230  bool CheckX86BuiltinTileDuplicate(CallExpr *TheCall, ArrayRef<int> ArgNums);
13231  bool CheckX86BuiltinTileRangeAndDuplicate(CallExpr *TheCall,
13232  ArrayRef<int> ArgNums);
13233  bool CheckX86BuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13234  CallExpr *TheCall);
13235  bool CheckPPCBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13236  CallExpr *TheCall);
13237  bool CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
13238  bool CheckRISCVLMUL(CallExpr *TheCall, unsigned ArgNum);
13239  bool CheckRISCVBuiltinFunctionCall(const TargetInfo &TI, unsigned BuiltinID,
13240  CallExpr *TheCall);
13241 
13242  bool CheckIntelFPGARegBuiltinFunctionCall(unsigned BuiltinID, CallExpr *Call);
13243  bool CheckIntelFPGAMemBuiltinFunctionCall(CallExpr *Call);
13244 
13245  bool SemaBuiltinVAStart(unsigned BuiltinID, CallExpr *TheCall);
13246  bool SemaBuiltinVAStartARMMicrosoft(CallExpr *Call);
13247  bool SemaBuiltinUnorderedCompare(CallExpr *TheCall);
13248  bool SemaBuiltinFPClassification(CallExpr *TheCall, unsigned NumArgs);
13249  bool SemaBuiltinComplex(CallExpr *TheCall);
13250  bool SemaBuiltinVSX(CallExpr *TheCall);
13251  bool SemaBuiltinOSLogFormat(CallExpr *TheCall);
13252  bool SemaValueIsRunOfOnes(CallExpr *TheCall, unsigned ArgNum);
13253 
13254 public:
13255  // Used by C++ template instantiation.
13256  ExprResult SemaBuiltinShuffleVector(CallExpr *TheCall);
13257  ExprResult SemaConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo,
13258  SourceLocation BuiltinLoc,
13259  SourceLocation RParenLoc);
13260 
13261  template <typename AttrTy>
13263  const CXXRecordDecl *RecTy = Ty->getAsCXXRecordDecl();
13264  if (!RecTy)
13265  return false;
13266  if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(RecTy)) {
13267  ClassTemplateDecl *Template = CTSD->getSpecializedTemplate();
13268  if (CXXRecordDecl *RD = Template->getTemplatedDecl())
13269  return RD->hasAttr<AttrTy>();
13270  }
13271  return RecTy->hasAttr<AttrTy>();
13272  }
13273 
13274 private:
13275  bool SemaBuiltinPrefetch(CallExpr *TheCall);
13276  bool SemaBuiltinAllocaWithAlign(CallExpr *TheCall);
13277  bool SemaBuiltinArithmeticFence(CallExpr *TheCall);
13278  bool SemaBuiltinAssume(CallExpr *TheCall);
13279  bool SemaBuiltinAssumeAligned(CallExpr *TheCall);
13280  bool SemaBuiltinLongjmp(CallExpr *TheCall);
13281  bool SemaBuiltinSetjmp(CallExpr *TheCall);
13282  ExprResult SemaBuiltinAtomicOverloaded(ExprResult TheCallResult);
13283  ExprResult SemaBuiltinNontemporalOverloaded(ExprResult TheCallResult);
13284  ExprResult SemaAtomicOpsOverloaded(ExprResult TheCallResult,
13286  ExprResult SemaBuiltinOperatorNewDeleteOverloaded(ExprResult TheCallResult,
13287  bool IsDelete);
13288  bool SemaBuiltinConstantArg(CallExpr *TheCall, int ArgNum,
13289  llvm::APSInt &Result);
13290  bool SemaBuiltinConstantArgRange(CallExpr *TheCall, int ArgNum, int Low,
13291  int High, bool RangeIsError = true);
13292  bool SemaBuiltinConstantArgMultiple(CallExpr *TheCall, int ArgNum,
13293  unsigned Multiple);
13294  bool SemaBuiltinConstantArgPower2(CallExpr *TheCall, int ArgNum);
13295  bool SemaBuiltinConstantArgShiftedByte(CallExpr *TheCall, int ArgNum,
13296  unsigned ArgBits);
13297  bool SemaBuiltinConstantArgShiftedByteOrXXFF(CallExpr *TheCall, int ArgNum,
13298  unsigned ArgBits);
13299  bool SemaBuiltinARMSpecialReg(unsigned BuiltinID, CallExpr *TheCall,
13300  int ArgNum, unsigned ExpectedFieldNum,
13301  bool AllowName);
13302  bool SemaBuiltinARMMemoryTaggingCall(unsigned BuiltinID, CallExpr *TheCall);
13303  bool SemaBuiltinPPCMMACall(CallExpr *TheCall, unsigned BuiltinID,
13304  const char *TypeDesc);
13305 
13306  bool CheckPPCMMAType(QualType Type, SourceLocation TypeLoc);
13307 
13308  bool SemaBuiltinElementwiseMath(CallExpr *TheCall);
13309  bool PrepareBuiltinElementwiseMathOneArgCall(CallExpr *TheCall);
13310  bool PrepareBuiltinReduceMathOneArgCall(CallExpr *TheCall);
13311 
13312  // Matrix builtin handling.
13313  ExprResult SemaBuiltinMatrixTranspose(CallExpr *TheCall,
13314  ExprResult CallResult);
13315  ExprResult SemaBuiltinMatrixColumnMajorLoad(CallExpr *TheCall,
13316  ExprResult CallResult);
13317  ExprResult SemaBuiltinMatrixColumnMajorStore(CallExpr *TheCall,
13318  ExprResult CallResult);
13319 
13320 public:
13332  };
13333  static FormatStringType GetFormatStringType(const FormatAttr *Format);
13334 
13335  bool FormatStringHasSArg(const StringLiteral *FExpr);
13336 
13337  static bool GetFormatNSStringIdx(const FormatAttr *Format, unsigned &Idx);
13338 
13339 private:
13340  bool CheckFormatArguments(const FormatAttr *Format,
13342  bool IsCXXMember,
13343  VariadicCallType CallType,
13344  SourceLocation Loc, SourceRange Range,
13345  llvm::SmallBitVector &CheckedVarArgs);
13346  bool CheckFormatArguments(ArrayRef<const Expr *> Args,
13347  bool HasVAListArg, unsigned format_idx,
13348  unsigned firstDataArg, FormatStringType Type,
13349  VariadicCallType CallType,
13351  llvm::SmallBitVector &CheckedVarArgs);
13352 
13353  void CheckAbsoluteValueFunction(const CallExpr *Call,
13354  const FunctionDecl *FDecl);
13355 
13356  void CheckMaxUnsignedZero(const CallExpr *Call, const FunctionDecl *FDecl);
13357 
13358  void CheckMemaccessArguments(const CallExpr *Call,
13359  unsigned BId,
13360  IdentifierInfo *FnName);
13361 
13362  void CheckStrlcpycatArguments(const CallExpr *Call,
13363  IdentifierInfo *FnName);
13364 
13365  void CheckStrncatArguments(const CallExpr *Call,
13366  IdentifierInfo *FnName);
13367 
13368  void CheckFreeArguments(const CallExpr *E);
13369 
13370  void CheckReturnValExpr(Expr *RetValExp, QualType lhsType,
13371  SourceLocation ReturnLoc,
13372  bool isObjCMethod = false,
13373  const AttrVec *Attrs = nullptr,
13374  const FunctionDecl *FD = nullptr);
13375 
13376 public:
13377  void CheckFloatComparison(SourceLocation Loc, Expr *LHS, Expr *RHS,
13379 
13380 private:
13381  void CheckImplicitConversions(Expr *E, SourceLocation CC = SourceLocation());
13382  void CheckBoolLikeConversion(Expr *E, SourceLocation CC);
13383  void CheckForIntOverflow(Expr *E);
13384  void CheckUnsequencedOperations(const Expr *E);
13385 
13386  /// Perform semantic checks on a completed expression. This will either
13387  /// be a full-expression or a default argument expression.
13388  void CheckCompletedExpr(Expr *E, SourceLocation CheckLoc = SourceLocation(),
13389  bool IsConstexpr = false);
13390 
13391  void CheckBitFieldInitialization(SourceLocation InitLoc, FieldDecl *Field,
13392  Expr *Init);
13393 
13394  /// Check if there is a field shadowing.
13395  void CheckShadowInheritedFields(const SourceLocation &Loc,
13396  DeclarationName FieldName,
13397  const CXXRecordDecl *RD,
13398  bool DeclIsField = true);
13399 
13400  /// Check if the given expression contains 'break' or 'continue'
13401  /// statement that produces control flow different from GCC.
13402  void CheckBreakContinueBinding(Expr *E);
13403 
13404  /// Check whether receiver is mutable ObjC container which
13405  /// attempts to add itself into the container
13406  void CheckObjCCircularContainer(ObjCMessageExpr *Message);
13407 
13408  void CheckTCBEnforcement(const CallExpr *TheCall, const FunctionDecl *Callee);
13409 
13410  void AnalyzeDeleteExprMismatch(const CXXDeleteExpr *DE);
13411  void AnalyzeDeleteExprMismatch(FieldDecl *Field, SourceLocation DeleteLoc,
13412  bool DeleteWasArrayForm);
13413 public:
13414  /// Register a magic integral constant to be used as a type tag.
13415  void RegisterTypeTagForDatatype(const IdentifierInfo *ArgumentKind,
13416  uint64_t MagicValue, QualType Type,
13417  bool LayoutCompatible, bool MustBeNull);
13418 
13419  struct TypeTagData {
13421 
13425  {}
13426 
13428 
13429  /// If true, \c Type should be compared with other expression's types for
13430  /// layout-compatibility.
13431  unsigned LayoutCompatible : 1;
13432  unsigned MustBeNull : 1;
13433  };
13434 
13435  /// A pair of ArgumentKind identifier and magic value. This uniquely
13436  /// identifies the magic value.
13437  typedef std::pair<const IdentifierInfo *, uint64_t> TypeTagMagicValue;
13438 
13439 private:
13440  /// A map from magic value to type information.
13441  std::unique_ptr<llvm::DenseMap<TypeTagMagicValue, TypeTagData>>
13442  TypeTagForDatatypeMagicValues;
13443 
13444  /// Peform checks on a call of a function with argument_with_type_tag
13445  /// or pointer_with_type_tag attributes.
13446  void CheckArgumentWithTypeTag(const ArgumentWithTypeTagAttr *Attr,
13447  const ArrayRef<const Expr *> ExprArgs,
13448  SourceLocation CallSiteLoc);
13449 
13450  /// Check if we are taking the address of a packed field
13451  /// as this may be a problem if the pointer value is dereferenced.
13452  void CheckAddressOfPackedMember(Expr *rhs);
13453 
13454  /// The parser's current scope.
13455  ///
13456  /// The parser maintains this state here.
13457  Scope *CurScope;
13458 
13459  mutable IdentifierInfo *Ident_super;
13460  mutable IdentifierInfo *Ident___float128;
13461 
13462  /// Nullability type specifiers.
13463  IdentifierInfo *Ident__Nonnull = nullptr;
13464  IdentifierInfo *Ident__Nullable = nullptr;
13465  IdentifierInfo *Ident__Nullable_result = nullptr;
13466  IdentifierInfo *Ident__Null_unspecified = nullptr;
13467 
13468  IdentifierInfo *Ident_NSError = nullptr;
13469 
13470  /// The handler for the FileChanged preprocessor events.
13471  ///
13472  /// Used for diagnostics that implement custom semantic analysis for #include
13473  /// directives, like -Wpragma-pack.
13474  sema::SemaPPCallbacks *SemaPPCallbackHandler;
13475 
13476 protected:
13477  friend class Parser;
13479  friend class ASTReader;
13480  friend class ASTDeclReader;
13481  friend class ASTWriter;
13482 
13483 public:
13484  /// Retrieve the keyword associated
13486 
13487  /// The struct behind the CFErrorRef pointer.
13488  RecordDecl *CFError = nullptr;
13489  bool isCFError(RecordDecl *D);
13490 
13491  /// Retrieve the identifier "NSError".
13493 
13494  /// Retrieve the parser's current scope.
13495  ///
13496  /// This routine must only be used when it is certain that semantic analysis
13497  /// and the parser are in precisely the same context, which is not the case
13498  /// when, e.g., we are performing any kind of template instantiation.
13499  /// Therefore, the only safe places to use this scope are in the parser
13500  /// itself and in routines directly invoked from the parser and *never* from
13501  /// template substitution or instantiation.
13502  Scope *getCurScope() const { return CurScope; }
13503 
13505  return CurScope->incrementMSManglingNumber();
13506  }
13507 
13510 
13511  Decl *getObjCDeclContext() const;
13512 
13515  }
13516 
13518  const DeclContext *DC = getCurLexicalContext();
13519  // A category implicitly has the attribute of the interface.
13520  if (const ObjCCategoryDecl *CatD = dyn_cast<ObjCCategoryDecl>(DC))
13521  DC = CatD->getClassInterface();
13522  return DC;
13523  }
13524 
13525  /// Determine the number of levels of enclosing template parameters. This is
13526  /// only usable while parsing. Note that this does not include dependent
13527  /// contexts in which no template parameters have yet been declared, such as
13528  /// in a terse function template or generic lambda before the first 'auto' is
13529  /// encountered.
13530  unsigned getTemplateDepth(Scope *S) const;
13531 
13532  /// To be used for checking whether the arguments being passed to
13533  /// function exceeds the number of parameters expected for it.
13534  static bool TooManyArguments(size_t NumParams, size_t NumArgs,
13535  bool PartialOverloading = false) {
13536  // We check whether we're just after a comma in code-completion.
13537  if (NumArgs > 0 && PartialOverloading)
13538  return NumArgs + 1 > NumParams; // If so, we view as an extra argument.
13539  return NumArgs > NumParams;
13540  }
13541 
13542  // Emitting members of dllexported classes is delayed until the class
13543  // (including field initializers) is fully parsed.
13546 
13547 private:
13548  int ParsingClassDepth = 0;
13549 
13550  class SavePendingParsedClassStateRAII {
13551  public:
13552  SavePendingParsedClassStateRAII(Sema &S) : S(S) { swapSavedState(); }
13553 
13554  ~SavePendingParsedClassStateRAII() {
13555  assert(S.DelayedOverridingExceptionSpecChecks.empty() &&
13556  "there shouldn't be any pending delayed exception spec checks");
13557  assert(S.DelayedEquivalentExceptionSpecChecks.empty() &&
13558  "there shouldn't be any pending delayed exception spec checks");
13559  swapSavedState();
13560  }
13561 
13562  private:
13563  Sema &S;
13565  SavedOverridingExceptionSpecChecks;
13567  SavedEquivalentExceptionSpecChecks;
13568 
13569  void swapSavedState() {
13570  SavedOverridingExceptionSpecChecks.swap(
13571  S.DelayedOverridingExceptionSpecChecks);
13572  SavedEquivalentExceptionSpecChecks.swap(
13573  S.DelayedEquivalentExceptionSpecChecks);
13574  }
13575  };
13576 
13577  /// Helper class that collects misaligned member designations and
13578  /// their location info for delayed diagnostics.
13579  struct MisalignedMember {
13580  Expr *E;
13581  RecordDecl *RD;
13582  ValueDecl *MD;
13583  CharUnits Alignment;
13584 
13585  MisalignedMember() : E(), RD(), MD() {}
13586  MisalignedMember(Expr *E, RecordDecl *RD, ValueDecl *MD,
13587  CharUnits Alignment)
13588  : E(E), RD(RD), MD(MD), Alignment(Alignment) {}
13589  explicit MisalignedMember(Expr *E)
13590  : MisalignedMember(E, nullptr, nullptr, CharUnits()) {}
13591 
13592  bool operator==(const MisalignedMember &m) { return this->E == m.E; }
13593  };
13594  /// Small set of gathered accesses to potentially misaligned members
13595  /// due to the packed attribute.
13596  SmallVector<MisalignedMember, 4> MisalignedMembers;
13597 
13598  /// Adds an expression to the set of gathered misaligned members.
13599  void AddPotentialMisalignedMembers(Expr *E, RecordDecl *RD, ValueDecl *MD,
13600  CharUnits Alignment);
13601 
13602 public:
13603  /// Diagnoses the current set of gathered accesses. This typically
13604  /// happens at full expression level. The set is cleared after emitting the
13605  /// diagnostics.
13607 
13608  /// This function checks if the expression is in the sef of potentially
13609  /// misaligned members and it is converted to some pointer type T with lower
13610  /// or equal alignment requirements. If so it removes it. This is used when
13611  /// we do not want to diagnose such misaligned access (e.g. in conversions to
13612  /// void*).
13613  void DiscardMisalignedMemberAddress(const Type *T, Expr *E);
13614 
13615  /// This function calls Action when it determines that E designates a
13616  /// misaligned member due to the packed attribute. This is used to emit
13617  /// local diagnostics like in reference binding.
13619  Expr *E,
13620  llvm::function_ref<void(Expr *, RecordDecl *, FieldDecl *, CharUnits)>
13621  Action);
13622 
13623  /// Describes the reason a calling convention specification was ignored, used
13624  /// for diagnostics.
13626  ForThisTarget = 0,
13630  };
13631 
13632 private:
13633  // We store SYCL Kernels here and handle separately -- which is a hack.
13634  // FIXME: It would be best to refactor this.
13635  llvm::SetVector<Decl *> SyclDeviceDecls;
13636  // SYCL integration header instance for current compilation unit this Sema
13637  // is associated with.
13638  std::unique_ptr<SYCLIntegrationHeader> SyclIntHeader;
13639  std::unique_ptr<SYCLIntegrationFooter> SyclIntFooter;
13640 
13641  // We need to store the list of the sycl_kernel functions and their associated
13642  // generated OpenCL Kernels so we can go back and re-name these after the
13643  // fact.
13645  SyclKernelsToOpenCLKernels;
13646 
13647  // Used to suppress diagnostics during kernel construction, since these were
13648  // already emitted earlier. Diagnosing during Kernel emissions also skips the
13649  // useful notes that shows where the kernel was called.
13650  bool DiagnosingSYCLKernel = false;
13651 
13652 public:
13653  void addSyclOpenCLKernel(const FunctionDecl *SyclKernel,
13654  FunctionDecl *OpenCLKernel) {
13655  SyclKernelsToOpenCLKernels.emplace_back(SyclKernel, OpenCLKernel);
13656  }
13657 
13658  void addSyclDeviceDecl(Decl *d) { SyclDeviceDecls.insert(d); }
13659  llvm::SetVector<Decl *> &syclDeviceDecls() { return SyclDeviceDecls; }
13660 
13661  /// Lazily creates and returns SYCL integration header instance.
13663  if (SyclIntHeader == nullptr)
13664  SyclIntHeader = std::make_unique<SYCLIntegrationHeader>(*this);
13665  return *SyclIntHeader.get();
13666  }
13667 
13669  if (SyclIntFooter == nullptr)
13670  SyclIntFooter = std::make_unique<SYCLIntegrationFooter>(*this);
13671  return *SyclIntFooter.get();
13672  }
13673 
13675  if (LangOpts.SYCLIsDevice && !LangOpts.SYCLIntFooter.empty())
13677  }
13678 
13693  };
13694 
13695  bool isKnownGoodSYCLDecl(const Decl *D);
13696  void checkSYCLDeviceVarDecl(VarDecl *Var);
13697  void copySYCLKernelAttrs(const CXXRecordDecl *KernelObj);
13698  void ConstructOpenCLKernel(FunctionDecl *KernelCallerFunc, MangleContext &MC);
13699  void SetSYCLKernelNames();
13700  void MarkDevices();
13701 
13702  /// Get the number of fields or captures within the parsed type.
13705  QualType SourceTy);
13706 
13707  /// Get a value based on the type of the given field number so that callers
13708  /// can wrap it in a decltype() to get the actual type of the field.
13711  QualType SourceTy, Expr *Idx);
13712 
13713  /// Get the number of base classes within the parsed type.
13716  QualType SourceTy);
13717 
13718  /// Get a value based on the type of the given base number so that callers
13719  /// can wrap it in a decltype() to get the actual type of the base class.
13722  Expr *Idx);
13723 
13724  /// Emit a diagnostic about the given attribute having a deprecated name, and
13725  /// also emit a fixit hint to generate the new attribute name.
13726  void DiagnoseDeprecatedAttribute(const ParsedAttr &A, StringRef NewScope,
13727  StringRef NewName);
13728 
13729  /// Diagnoses an attribute in the 'intelfpga' namespace and suggests using
13730  /// the attribute in the 'intel' namespace instead.
13732  StringRef NewName = "");
13733 
13734  /// Creates a SemaDiagnosticBuilder that emits the diagnostic if the current
13735  /// context is "used as device code".
13736  ///
13737  /// - If CurLexicalContext is a kernel function or it is known that the
13738  /// function will be emitted for the device, emits the diagnostics
13739  /// immediately.
13740  /// - If CurLexicalContext is a function and we are compiling
13741  /// for the device, but we don't know that this function will be codegen'ed
13742  /// for devive yet, creates a diagnostic which is emitted if and when we
13743  /// realize that the function will be codegen'ed.
13744  ///
13745  /// Example usage:
13746  ///
13747  /// Diagnose __float128 type usage only from SYCL device code if the current
13748  /// target doesn't support it
13749  /// if (!S.Context.getTargetInfo().hasFloat128Type() &&
13750  /// S.getLangOpts().SYCLIsDevice)
13751  /// SYCLDiagIfDeviceCode(Loc, diag::err_type_unsupported) << "__float128";
13752  SemaDiagnosticBuilder SYCLDiagIfDeviceCode(
13753  SourceLocation Loc, unsigned DiagID,
13756 
13757  /// Check whether we're allowed to call Callee from the current context.
13758  ///
13759  /// - If the call is never allowed in a semantically-correct program
13760  /// emits an error and returns false.
13761  ///
13762  /// - If the call is allowed in semantically-correct programs, but only if
13763  /// it's never codegen'ed, creates a deferred diagnostic to be emitted if
13764  /// and when the caller is codegen'ed, and returns true.
13765  ///
13766  /// - Otherwise, returns true without emitting any diagnostics.
13767  ///
13768  /// Adds Callee to DeviceCallGraph if we don't know if its caller will be
13769  /// codegen'ed yet.
13772  llvm::DenseSet<QualType> Visited,
13773  ValueDecl *DeclToCheck);
13774 
13775  /// Finishes analysis of the deferred functions calls that may be not
13776  /// properly declared for device compilation.
13777  void finalizeSYCLDelayedAnalysis(const FunctionDecl *Caller,
13778  const FunctionDecl *Callee,
13779  SourceLocation Loc,
13780  DeviceDiagnosticReason Reason);
13781 
13782  /// Tells whether given variable is a SYCL explicit SIMD extension's "private
13783  /// global" variable - global variable in the private address space.
13785  return getLangOpts().SYCLIsDevice && VDecl->hasAttr<SYCLSimdAttr>() &&
13786  VDecl->hasGlobalStorage() &&
13788  }
13789 };
13790 
13791 /// RAII object that enters a new expression evaluation context.
13793  Sema &Actions;
13794  bool Entered = true;
13795 
13796 public:
13798  Sema &Actions, Sema::ExpressionEvaluationContext NewContext,
13799  Decl *LambdaContextDecl = nullptr,
13802  bool ShouldEnter = true)
13803  : Actions(Actions), Entered(ShouldEnter) {
13804  if (Entered)
13805  Actions.PushExpressionEvaluationContext(NewContext, LambdaContextDecl,
13806  ExprContext);
13807  }
13809  Sema &Actions, Sema::ExpressionEvaluationContext NewContext,
13813  : Actions(Actions) {
13815  NewContext, Sema::ReuseLambdaContextDecl, ExprContext);
13816  }
13817 
13820  bool ShouldEnter = true)
13821  : Actions(Actions), Entered(false) {
13822  // In C++11 onwards, narrowing checks are performed on the contents of
13823  // braced-init-lists, even when they occur within unevaluated operands.
13824  // Therefore we still need to instantiate constexpr functions used in such
13825  // a context.
13826  if (ShouldEnter && Actions.isUnevaluatedContext() &&
13827  Actions.getLangOpts().CPlusPlus11) {
13830  Entered = true;
13831  }
13832  }
13833 
13835  if (Entered)
13837  }
13838 };
13839 
13840 DeductionFailureInfo
13842  sema::TemplateDeductionInfo &Info);
13843 
13844 /// Contains a late templated function.
13845 /// Will be parsed at the end of the translation unit, used by Sema & Parser.
13848  /// The template function declaration to be late parsed.
13850 };
13851 
13852 template <>
13854  PragmaMsStackAction Action,
13855  llvm::StringRef StackSlotLabel,
13856  AlignPackInfo Value);
13857 
13858 } // end namespace clang
13859 
13860 namespace llvm {
13861 // Hash a FunctionDeclAndLoc by looking at both its FunctionDecl and its
13862 // SourceLocation.
13863 template <> struct DenseMapInfo<clang::Sema::FunctionDeclAndLoc> {
13865  using FDBaseInfo = DenseMapInfo<clang::CanonicalDeclPtr<clang::FunctionDecl>>;
13866 
13868  return {FDBaseInfo::getEmptyKey(), clang::SourceLocation()};
13869  }
13870 
13872  return {FDBaseInfo::getTombstoneKey(), clang::SourceLocation()};
13873  }
13874 
13875  static unsigned getHashValue(const FunctionDeclAndLoc &FDL) {
13876  return hash_combine(FDBaseInfo::getHashValue(FDL.FD),
13877  FDL.Loc.getHashValue());
13878  }
13879 
13880  static bool isEqual(const FunctionDeclAndLoc &LHS,
13881  const FunctionDeclAndLoc &RHS) {
13882  return LHS.FD == RHS.FD && LHS.Loc == RHS.Loc;
13883  }
13884 };
13885 } // namespace llvm
13886 
13887 #endif
clang::Sema::ActOnSuperMessage
ExprResult ActOnSuperMessage(Scope *S, SourceLocation SuperLoc, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
Definition: SemaExprObjC.cpp:2382
clang::Sema::MergeIntelNamedSubGroupSizeAttr
IntelNamedSubGroupSizeAttr * MergeIntelNamedSubGroupSizeAttr(Decl *D, const IntelNamedSubGroupSizeAttr &A)
clang::Sema::DelayedDiagnostics::pushUndelayed
DelayedDiagnosticsState pushUndelayed()
Enter a new scope where access and deprecation diagnostics are not delayed.
Definition: Sema.h:1141
clang::Sema::ActOnCXXConditionDeclaration
DeclResult ActOnCXXConditionDeclaration(Scope *S, Declarator &D)
ActOnCXXConditionDeclarationExpr - Parsed a condition declaration of a C++ if/switch/while/for statem...
Definition: SemaDeclCXX.cpp:17650
clang::Sema::ActOnOpenMPDepobjClause
OMPClause * ActOnOpenMPDepobjClause(Expr *Depobj, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'depobj' pseudo clause.
Definition: SemaOpenMP.cpp:19598
clang::Sema::BuildObjCObjectType
QualType BuildObjCObjectType(QualType BaseType, SourceLocation Loc, SourceLocation TypeArgsLAngleLoc, ArrayRef< TypeSourceInfo * > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
Build an Objective-C object pointer type.
Definition: SemaType.cpp:1080
clang::Sema::InstantiateAttrsForDecl
void InstantiateAttrsForDecl(const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
Definition: SemaTemplateInstantiateDecl.cpp:918
clang::Sema::CodeCompleteObjCSuperclass
void CodeCompleteObjCSuperclass(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
Definition: SemaCodeComplete.cpp:8364
clang::Sema::MissingImportKind::DefaultArgument
@ DefaultArgument
clang::Sema::finishLambdaExplicitCaptures
void finishLambdaExplicitCaptures(sema::LambdaScopeInfo *LSI)
Note that we have finished the explicit captures for the given lambda.
Definition: SemaLambda.cpp:518
clang::Sema::MissingImportKind::Declaration
@ Declaration
clang::ElaboratedTypeKeyword
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
Definition: Type.h:5405
clang::Sema::CheckConversionToObjCLiteral
bool CheckConversionToObjCLiteral(QualType DstType, Expr *&SrcExpr, bool Diagnose=true)
Definition: SemaExpr.cpp:16414
clang::ExplicitSpecifier
Store information needed for an explicit specifier.
Definition: DeclCXX.h:1815
clang::OpenMPDeviceClauseModifier
OpenMPDeviceClauseModifier
OpenMP modifiers for 'device' clause.
Definition: OpenMPKinds.h:47
clang::Sema::NamedReturnInfo::isCopyElidable
bool isCopyElidable() const
Definition: Sema.h:5158
clang::Sema::ActOnLabelStmt
StmtResult ActOnLabelStmt(SourceLocation IdentLoc, LabelDecl *TheDecl, SourceLocation ColonLoc, Stmt *SubStmt)
Definition: SemaStmt.cpp:544
clang::Sema::CheckVectorLogicalOperands
QualType CheckVectorLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc)
Definition: SemaExpr.cpp:12888
clang::Sema::getPrintable
static SourceRange getPrintable(SourceLocation L)
Definition: Sema.h:2389
clang::Sema::NTK_TemplateTemplateArgument
@ NTK_TemplateTemplateArgument
Definition: Sema.h:3364
clang::Sema::ActOnOpenMPDeclareReductionCombinerStart
void ActOnOpenMPDeclareReductionCombinerStart(Scope *S, Decl *D)
Initialize declare reduction construct initializer.
Definition: SemaOpenMP.cpp:21287
clang::Sema::ActOnOpenMPOrderedClause
OMPClause * ActOnOpenMPOrderedClause(SourceLocation StartLoc, SourceLocation EndLoc, SourceLocation LParenLoc=SourceLocation(), Expr *NumForLoops=nullptr)
Called on well-formed 'ordered' clause.
Definition: SemaOpenMP.cpp:15851
clang::Sema::isTypeDecoratedWithDeclAttribute
bool isTypeDecoratedWithDeclAttribute(QualType Ty)
Definition: Sema.h:13262
clang::Sema::ImmediateDiagBuilder::ImmediateDiagBuilder
ImmediateDiagBuilder(DiagnosticBuilder &DB, Sema &SemaRef, unsigned DiagID)
Definition: Sema.h:1823
clang::Sema::CheckShadow
void CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, const LookupResult &R)
Diagnose variable or built-in function shadowing.
Definition: SemaDecl.cpp:7865
clang::Sema::hasAnyUnrecoverableErrorsInThisFunction
bool hasAnyUnrecoverableErrorsInThisFunction() const
Determine whether any errors occurred within this function/method/ block.
Definition: Sema.cpp:2338
clang::Sema::ActOnModuleImport
DeclResult ActOnModuleImport(SourceLocation StartLoc, SourceLocation ExportLoc, SourceLocation ImportLoc, ModuleIdPath Path, bool IsPartition=false)
The parser has processed a module import declaration.
Definition: SemaModule.cpp:399
clang::Sema::AtomicArgumentOrder
AtomicArgumentOrder
Definition: Sema.h:5830
clang::Sema::MergeIntelFPGABankWidthAttr
IntelFPGABankWidthAttr * MergeIntelFPGABankWidthAttr(Decl *D, const IntelFPGABankWidthAttr &A)
clang::Sema::IER_Error
@ IER_Error
An error occurred.
Definition: Sema.h:5981
clang::Sema::getPrintable
static SourceRange getPrintable(TypeLoc TL)
Definition: Sema.h:2391
clang::UnqualifiedId
Represents a C++ unqualified-id that has been parsed.
Definition: DeclSpec.h:950
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1150
clang::Sema::SpecialMemberOverloadResult
SpecialMemberOverloadResult - The overloading result for a special member function.
Definition: Sema.h:1546
clang::Sema::DiagnoseEqualityWithExtraParens
void DiagnoseEqualityWithExtraParens(ParenExpr *ParenE)
Redundant parentheses over an equality comparison can indicate that the user intended an assignment u...
Definition: SemaExpr.cpp:19575
clang::Sema::resolveAssumedTemplateNameAsType
bool resolveAssumedTemplateNameAsType(Scope *S, TemplateName &Name, SourceLocation NameLoc, bool Diagnose=true)
Definition: SemaTemplate.cpp:3870
clang::NormalizedConstraint
A normalized constraint, as defined in C++ [temp.constr.normal], is either an atomic constraint,...
Definition: SemaConcept.h:81
clang::Sema::PCC_ObjCInterface
@ PCC_ObjCInterface
Code completion occurs within an Objective-C interface, protocol, or category.
Definition: Sema.h:12962
clang::Sema::TDK_Inconsistent
@ TDK_Inconsistent
Template argument deduction produced inconsistent deduced values for the given template parameter.
Definition: Sema.h:8823
clang::NonOdrUseReason
NonOdrUseReason
The reason why a DeclRefExpr does not constitute an odr-use.
Definition: Specifiers.h:158
clang::Sema::SemaConvertVectorExpr
ExprResult SemaConvertVectorExpr(Expr *E, TypeSourceInfo *TInfo, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
SemaConvertVectorExpr - Handle __builtin_convertvector.
Definition: SemaChecking.cpp:7281
clang::Sema::DelegatingCtorDeclsType
LazyVector< CXXConstructorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadDelegatingConstructors, 2, 2 > DelegatingCtorDeclsType
Definition: Sema.h:1053
clang::Sema::CheckDelayedMemberExceptionSpecs
void CheckDelayedMemberExceptionSpecs()
Definition: SemaDeclCXX.cpp:8867
clang::Sema::RequireCompleteSizedExprType
bool RequireCompleteSizedExprType(Expr *E, unsigned DiagID, const Ts &... Args)
Definition: Sema.h:2644
clang::Sema::UnifySection
bool UnifySection(StringRef SectionName, int SectionFlags, NamedDecl *TheDecl)
Definition: SemaAttr.cpp:643
clang::Sema::BuildDeclarationNameExpr
ExprResult BuildDeclarationNameExpr(const CXXScopeSpec &SS, LookupResult &R, bool NeedsADL, bool AcceptInvalidDecl=false)
Definition: SemaExpr.cpp:3229
clang::Sema::isModuleDirectlyImported
bool isModuleDirectlyImported(const Module *M)
Definition: Sema.h:2518
clang::Sema::ImplicitExceptionSpecification::getExceptionSpec
FunctionProtoType::ExceptionSpecInfo getExceptionSpec() const
Overwrite an EPI's exception specification with this computed exception specification.
Definition: Sema.h:6283
clang::Sema::BuildCXXDefaultInitExpr
ExprResult BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field)
Definition: SemaDeclCXX.cpp:15549
clang::Sema::CurContext
DeclContext * CurContext
CurContext - This is the current declaration context of parsing.
Definition: Sema.h:599
clang::Sema::ReplaceAutoType
QualType ReplaceAutoType(QualType TypeWithAuto, QualType Replacement)
Completely replace the auto in TypeWithAuto by Replacement.
Definition: SemaTemplateDeduction.cpp:4829
clang::Sema::actOnObjCProtocolQualifierType
TypeResult actOnObjCProtocolQualifierType(SourceLocation lAngleLoc, ArrayRef< Decl * > protocols, ArrayRef< SourceLocation > protocolLocs, SourceLocation rAngleLoc)
Build a an Objective-C protocol-qualified 'id' type where no base type was specified.
Definition: SemaType.cpp:1116
clang::Sema::InstantiateVariableInitializer
void InstantiateVariableInitializer(VarDecl *Var, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiate the initializer of a variable.
Definition: SemaTemplateInstantiateDecl.cpp:5695
NSAPI.h
clang::Sema::CCEK_ExplicitBool
@ CCEK_ExplicitBool
Condition in an explicit(bool) specifier.
Definition: Sema.h:3867
clang::Sema::RefsMinusAssignments
llvm::DenseMap< const VarDecl *, int > RefsMinusAssignments
Increment when we find a reference; decrement when we find an ignored assignment.
Definition: Sema.h:1750
clang::Sema::VTableUses
SmallVector< VTableUse, 16 > VTableUses
The list of vtables that are required but have not yet been materialized.
Definition: Sema.h:7499
clang::Sema::UPPC_Expression
@ UPPC_Expression
An arbitrary expression.
Definition: Sema.h:8441
clang::Sema::BuildSYCLIntelFPGAMaxConcurrencyAttr
SYCLIntelFPGAMaxConcurrencyAttr * BuildSYCLIntelFPGAMaxConcurrencyAttr(const AttributeCommonInfo &CI, Expr *E)
Definition: SemaStmtAttr.cpp:72
clang::Sema::DefaultArgumentPromotion
ExprResult DefaultArgumentPromotion(Expr *E)
DefaultArgumentPromotion (C99 6.5.2.2p6).
Definition: SemaExpr.cpp:894
Builtins.h
clang::Sema::getUndefinedButUsed
void getUndefinedButUsed(SmallVectorImpl< std::pair< NamedDecl *, SourceLocation > > &Undefined)
Obtain a sorted list of functions that are undefined but ODR-used.
Definition: Sema.cpp:837
clang::ObjCBridgeCastKind
ObjCBridgeCastKind
The kind of bridging performed by the Objective-C bridge cast.
Definition: OperationKinds.h:36
clang::Sema::LookupTemplateName
bool LookupTemplateName(LookupResult &R, Scope *S, CXXScopeSpec &SS, QualType ObjectType, bool EnteringContext, bool &MemberOfUnknownSpecialization, RequiredTemplateKind RequiredTemplate=SourceLocation(), AssumedTemplateKind *ATK=nullptr, bool AllowTypoCorrection=true)
Definition: SemaTemplate.cpp:370
clang::Sema::CheckAdditionOperands
QualType CheckAdditionOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, QualType *CompLHSTy=nullptr)
Definition: SemaExpr.cpp:11080
clang::Sema::CorrectTypoKind
CorrectTypoKind
Definition: Sema.h:4542
clang::Sema::ActOnOpenMPDistributeDirective
StmtResult ActOnOpenMPDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13224
clang::Sema::CodeCompleteOperatorName
void CodeCompleteOperatorName(Scope *S)
Definition: SemaCodeComplete.cpp:6661
clang::Sema::DiagnoseDuplicateIvars
void DiagnoseDuplicateIvars(ObjCInterfaceDecl *ID, ObjCInterfaceDecl *SID)
DiagnoseDuplicateIvars - Check for duplicate ivars in the entire class at the start of @implementatio...
Definition: SemaDeclObjC.cpp:3755
clang::Sema::CFP_Never
@ CFP_Never
Definition: Sema.h:12836
clang::Sema::setFunctionHasIndirectGoto
void setFunctionHasIndirectGoto()
Definition: Sema.cpp:2352
clang::CaseStmt
CaseStmt - Represent a case statement.
Definition: Stmt.h:1572
clang::Sema::FindAllocationFunctions
bool FindAllocationFunctions(SourceLocation StartLoc, SourceRange Range, AllocationFunctionScope NewScope, AllocationFunctionScope DeleteScope, QualType AllocType, bool IsArray, bool &PassAlignment, MultiExprArg PlaceArgs, FunctionDecl *&OperatorNew, FunctionDecl *&OperatorDelete, bool Diagnose=true)
Finds the overloads of operator new and delete that are appropriate for the allocation.
Definition: SemaExprCXX.cpp:2615
clang::Sema::VAListTagName
DeclarationName VAListTagName
VAListTagName - The declaration name corresponding to __va_list_tag.
Definition: Sema.h:607
clang::Sema::isDependentScopeSpecifier
bool isDependentScopeSpecifier(const CXXScopeSpec &SS)
Definition: SemaCXXScopeSpec.cpp:167
clang::ObjCDeclSpec
Captures information about "declaration specifiers" specific to Objective-C.
Definition: DeclSpec.h:822
clang::Sema::checkTargetAttr
bool checkTargetAttr(SourceLocation LiteralLoc, StringRef Str)
clang::Sema::warnStackExhausted
void warnStackExhausted(SourceLocation Loc)
Warn that the stack is nearly exhausted.
Definition: Sema.cpp:537
clang::Sema::NC_FunctionTemplate
@ NC_FunctionTemplate
The name was classified as a function template name.
Definition: Sema.h:2755
clang::Sema::RetainOwnershipKind::OS
@ OS
clang::Sema::mergeMSInheritanceAttr
MSInheritanceAttr * mergeMSInheritanceAttr(Decl *D, const AttributeCommonInfo &CI, bool BestCase, MSInheritanceModel Model)
clang::Sema::ActOnExplicitInstantiation
DeclResult ActOnExplicitInstantiation(Scope *S, SourceLocation ExternLoc, SourceLocation TemplateLoc, unsigned TagSpec, SourceLocation KWLoc, const CXXScopeSpec &SS, TemplateTy Template, SourceLocation TemplateNameLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, const ParsedAttributesView &Attr)
Definition: SemaTemplate.cpp:9516
clang::Sema::FullExprArg::release
ExprResult release()
Definition: Sema.h:4967
clang::Sema::getNonFieldDeclScope
Scope * getNonFieldDeclScope(Scope *S)
getNonFieldDeclScope - Retrieves the innermost scope, starting from S, where a non-field would be dec...
Definition: SemaDecl.cpp:2170
clang::Sema::AvailabilityPriority
AvailabilityPriority
Describes the kind of priority given to an availability attribute.
Definition: Sema.h:3665
clang::Sema::CorrectTypoDelayed
TypoExpr * CorrectTypoDelayed(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, TypoDiagnosticGenerator TDG, TypoRecoveryCallback TRC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr)
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
Definition: SemaLookup.cpp:5236
clang::ArrayTypeTrait
ArrayTypeTrait
Names for the array type traits.
Definition: TypeTraits.h:42
clang::SYCLIntegrationHeader::kind_specialization_constants_buffer
@ kind_specialization_constants_buffer
Definition: Sema.h:320
clang::Sema::diagnoseQualifiedDeclaration
bool diagnoseQualifiedDeclaration(CXXScopeSpec &SS, DeclContext *DC, DeclarationName Name, SourceLocation Loc, bool IsTemplateId)
Diagnose a declaration whose declarator-id has the given nested-name-specifier.
Definition: SemaDecl.cpp:5848
clang::Sema::PragmaOptionsAlignKind
PragmaOptionsAlignKind
Definition: Sema.h:10351
clang::ASTConstraintSatisfaction
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
Definition: ASTConcept.h:76
clang::Sema::isSYCLEsimdPrivateGlobal
bool isSYCLEsimdPrivateGlobal(VarDecl *VDecl)
Tells whether given variable is a SYCL explicit SIMD extension's "private global" variable - global v...
Definition: Sema.h:13784
clang::Sema::isOpenMPGlobalCapturedDecl
bool isOpenMPGlobalCapturedDecl(ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
Check if the specified global variable must be captured by outer capture regions.
Definition: SemaOpenMP.cpp:2455
clang::Sema::makeMergedDefinitionVisible
void makeMergedDefinitionVisible(NamedDecl *ND)
Make a merged definition of an existing hidden definition ND visible at the specified location.
Definition: SemaLookup.cpp:1556
clang::Sema::ActOnGlobalModuleFragmentDecl
DeclGroupPtrTy ActOnGlobalModuleFragmentDecl(SourceLocation ModuleLoc)
The parser has processed a global-module-fragment declaration that begins the definition of the globa...
Definition: SemaModule.cpp:75
clang::Sema::isInitListConstructor
bool isInitListConstructor(const FunctionDecl *Ctor)
Determine whether Ctor is an initializer-list constructor, as defined in [dcl.init....
Definition: SemaDeclCXX.cpp:11569
clang::Sema::PragmaClangRelroSection
PragmaClangSection PragmaClangRelroSection
Definition: Sema.h:651
clang::Sema::CheckConceptTemplateId
ExprResult CheckConceptTemplateId(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &ConceptNameInfo, NamedDecl *FoundDecl, ConceptDecl *NamedConcept, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaTemplate.cpp:4682
clang::Sema::ActOnTemplateParameterList
TemplateParameterList * ActOnTemplateParameterList(unsigned Depth, SourceLocation ExportLoc, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ArrayRef< NamedDecl * > Params, SourceLocation RAngleLoc, Expr *RequiresClause)
ActOnTemplateParameterList - Builds a TemplateParameterList, optionally constrained by RequiresClause...
Definition: SemaTemplate.cpp:1687
clang::Sema::DelayedDiagnostics
A class which encapsulates the logic for delaying diagnostics during parsing and other processing.
Definition: Sema.h:1104
clang::Sema::ModuleImportState::NotACXX20Module
@ NotACXX20Module
Not a C++20 TU, or an invalid state was found.
clang::Sema::CheckConditionVariable
ExprResult CheckConditionVariable(VarDecl *ConditionVar, SourceLocation StmtLoc, ConditionKind CK)
Check the use of the given variable as a C++ condition in an if, while, do-while, or switch statement...
Definition: SemaExprCXX.cpp:3925
clang::Sema::InstantiatingTemplate::ParameterMappingSubstitution
Definition: Sema.h:9422
clang::EnterExpressionEvaluationContext::~EnterExpressionEvaluationContext
~EnterExpressionEvaluationContext()
Definition: Sema.h:13834
clang::Sema::isCurrentClassNameTypo
bool isCurrentClassNameTypo(IdentifierInfo *&II, const CXXScopeSpec *SS)
Determine whether the identifier II is a typo for the name of the class type currently being defined.
Definition: SemaDeclCXX.cpp:2433
clang::Sema::ActOnOpenMPRegionEnd
StmtResult ActOnOpenMPRegionEnd(StmtResult S, ArrayRef< OMPClause * > Clauses)
End of OpenMP region.
Definition: SemaOpenMP.cpp:4544
clang::Sema::BuildReadPipeType
QualType BuildReadPipeType(QualType T, SourceLocation Loc)
Build a Read-only Pipe type.
Definition: SemaType.cpp:2251
clang::Sema::ActOnStartOpenMPDeclareTargetContext
bool ActOnStartOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI)
Called on the start of target region i.e. '#pragma omp declare target'.
Definition: SemaOpenMP.cpp:21915
clang::Sema::MergeIntelFPGAMaxReplicatesAttr
IntelFPGAMaxReplicatesAttr * MergeIntelFPGAMaxReplicatesAttr(Decl *D, const IntelFPGAMaxReplicatesAttr &A)
clang::Sema::DefaultedFunctionKind::getDiagnosticIndex
unsigned getDiagnosticIndex() const
Get the index of this function kind for use in diagnostics.
Definition: Sema.h:3476
clang::Sema::ActOnOpenMPSimpleClause
OMPClause * ActOnOpenMPSimpleClause(OpenMPClauseKind Kind, unsigned Argument, SourceLocation ArgumentLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:15876
clang::Sema::LookupNamespaceName
@ LookupNamespaceName
Look up a namespace name within a C++ using directive or namespace alias definition,...
Definition: Sema.h:4328
clang::Sema::ActOnOpenMPWriteClause
OMPClause * ActOnOpenMPWriteClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'write' clause.
Definition: SemaOpenMP.cpp:16569
clang::Sema::CheckFunctionReturnType
bool CheckFunctionReturnType(QualType T, SourceLocation Loc)
Definition: SemaType.cpp:2791
clang::Sema::ExpressionEvaluationContextRecord::EK_TemplateArgument
@ EK_TemplateArgument
Definition: Sema.h:1483
clang::Sema::ScalarTypeToBooleanCastKind
static CastKind ScalarTypeToBooleanCastKind(QualType ScalarTy)
ScalarTypeToBooleanCastKind - Returns the cast kind corresponding to the conversion from scalar type ...
Definition: Sema.cpp:740
clang::Sema::ActOnCapturedRegionEnd
StmtResult ActOnCapturedRegionEnd(Stmt *S)
Definition: SemaStmt.cpp:4816
clang::Sema::MissingImportKind::PartialSpecialization
@ PartialSpecialization
clang::FileNullabilityMap::Nullability
FileNullability Nullability
Definition: Sema.h:271
clang::Sema::LookupOverloadedBinOp
void LookupOverloadedBinOp(OverloadCandidateSet &CandidateSet, OverloadedOperatorKind Op, const UnresolvedSetImpl &Fns, ArrayRef< Expr * > Args, bool RequiresADL=true)
Perform lookup for an overloaded binary operator.
Definition: SemaOverload.cpp:13510
clang::Sema::NoteAllFoundTemplates
void NoteAllFoundTemplates(TemplateName Name)
Definition: SemaTemplate.cpp:3415
clang::Sema::runWithSufficientStackSpace
void runWithSufficientStackSpace(SourceLocation Loc, llvm::function_ref< void()> Fn)
Run some code with "sufficient" stack space.
Definition: Sema.cpp:545
clang::Sema::ObjCArgInfo::Type
ParsedType Type
Definition: Sema.h:10168
clang::Sema::AlignPackInfo::getFromRawEncoding
static AlignPackInfo getFromRawEncoding(unsigned Encoding)
Definition: Sema.h:704
clang::Sema::RebuildNestedNameSpecifierInCurrentInstantiation
bool RebuildNestedNameSpecifierInCurrentInstantiation(CXXScopeSpec &SS)
Definition: SemaTemplate.cpp:10838
clang::PreferredTypeBuilder::enterBinary
void enterBinary(Sema &S, SourceLocation Tok, Expr *LHS, tok::TokenKind Op)
Definition: SemaCodeComplete.cpp:555
llvm
YAML serialization mapping.
Definition: Dominators.h:30
clang::Sema::NTCUK_Init
@ NTCUK_Init
Definition: Sema.h:3117
clang::Sema::InstantiateClass
bool InstantiateClass(SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK, bool Complain=true)
Instantiate the definition of a class from a given pattern.
Definition: SemaTemplateInstantiate.cpp:2710
Weak.h
clang::Sema::getMoreSpecializedTemplate
FunctionTemplateDecl * getMoreSpecializedTemplate(FunctionTemplateDecl *FT1, FunctionTemplateDecl *FT2, SourceLocation Loc, TemplatePartialOrderingContext TPOC, unsigned NumCallArguments1, unsigned NumCallArguments2, bool Reversed=false)
Returns the more specialized function template according to the rules of function template partial or...
Definition: SemaTemplateDeduction.cpp:5149
clang::Sema::CheckPlaceholderExpr
ExprResult CheckPlaceholderExpr(Expr *E)
Check for operands with placeholder types and complain if found.
Definition: SemaExpr.cpp:20190
clang::CXXConstructorDecl
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2421
clang::Sema::MarkAsLateParsedTemplate
void MarkAsLateParsedTemplate(FunctionDecl *FD, Decl *FnD, CachedTokens &Toks)
Definition: SemaTemplate.cpp:10945
clang::Sema::CheckLValueToRValueConversionOperand
ExprResult CheckLValueToRValueConversionOperand(Expr *E)
Definition: SemaExpr.cpp:18948
clang::Sema::GetSignedVectorType
QualType GetSignedVectorType(QualType V)
Definition: SemaExpr.cpp:12657
clang::Sema::PopCompoundScope
void PopCompoundScope()
Definition: Sema.cpp:2329
clang::Sema::ActOnParamDefaultArgumentError
void ActOnParamDefaultArgumentError(Decl *param, SourceLocation EqualLoc)
ActOnParamDefaultArgumentError - Parsing or semantic analysis of the default argument for the paramet...
Definition: SemaDeclCXX.cpp:376
clang::Sema::ActOnOpenMPCaptureClause
OMPClause * ActOnOpenMPCaptureClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'capture' clause.
Definition: SemaOpenMP.cpp:16579
clang::Sema::PCSA_Set
@ PCSA_Set
Definition: Sema.h:638
clang::Sema::CheckObjCPropertyAttributes
void CheckObjCPropertyAttributes(Decl *PropertyPtrTy, SourceLocation Loc, unsigned &Attributes, bool propertyInPrimaryClass)
Ensure attributes are consistent with type.
Definition: SemaObjCProperty.cpp:2639
clang::Sema::GetIvarBackingPropertyAccessor
ObjCIvarDecl * GetIvarBackingPropertyAccessor(const ObjCMethodDecl *Method, const ObjCPropertyDecl *&PDecl) const
GetIvarBackingPropertyAccessor - If method is a property setter/getter and it property has a backing ...
Definition: SemaDeclObjC.cpp:5261
clang::Sema::RetainOwnershipKind
RetainOwnershipKind
Definition: Sema.h:10709
clang::Sema::BuildAttributedStmt
StmtResult BuildAttributedStmt(SourceLocation AttrsLoc, ArrayRef< const Attr * > Attrs, Stmt *SubStmt)
Definition: SemaStmt.cpp:573
clang::Sema::MatchTemplateParametersToScopeSpecifier
TemplateParameterList * MatchTemplateParametersToScopeSpecifier(SourceLocation DeclStartLoc, SourceLocation DeclLoc, const CXXScopeSpec &SS, TemplateIdAnnotation *TemplateId, ArrayRef< TemplateParameterList * > ParamLists, bool IsFriend, bool &IsMemberSpecialization, bool &Invalid, bool SuppressDiagnostic=false)
Match the given template parameter lists to the given scope specifier, returning the template paramet...
Definition: SemaTemplate.cpp:3054
clang::Sema::DiagnoseUnusedNestedTypedefs
void DiagnoseUnusedNestedTypedefs(const RecordDecl *D)
Definition: SemaDecl.cpp:1961
clang::Sema::KernelGlobalVariable
@ KernelGlobalVariable
Definition: Sema.h:13680
clang::Sema::UnparsedDefaultArgInstantiations
UnparsedDefaultArgInstantiationsMap UnparsedDefaultArgInstantiations
A mapping from parameters with unparsed default arguments to the set of instantiations of each parame...
Definition: Sema.h:1610
clang::Sema::ActOnNoexceptExpr
ExprResult ActOnNoexceptExpr(SourceLocation KeyLoc, SourceLocation LParen, Expr *Operand, SourceLocation RParen)
Definition: SemaExprCXX.cpp:7924
clang::Sema::SubstDeclarationNameInfo
DeclarationNameInfo SubstDeclarationNameInfo(const DeclarationNameInfo &NameInfo, const MultiLevelTemplateArgumentList &TemplateArgs)
Do template substitution on declaration name info.
Definition: SemaTemplateInstantiate.cpp:3614
clang::Sema::DiagnoseUnimplementedProperties
void DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *CDecl, bool SynthesizeProperties)
DiagnoseUnimplementedProperties - This routine warns on those properties which must be implemented by...
Definition: SemaObjCProperty.cpp:2032
clang::Sema::ExpressionEvaluationContextRecord::ExpressionKind
ExpressionKind
Describes whether we are in an expression constext which we have to handle differently.
Definition: Sema.h:1482
clang::Sema::TDK_Invalid
@ TDK_Invalid
The declaration was invalid; do nothing.
Definition: Sema.h:8811
clang::Sema::PCC_Namespace
@ PCC_Namespace
Code completion occurs at top-level or namespace context.
Definition: Sema.h:12957
clang::Sema::IncompatiblePointer
@ IncompatiblePointer
IncompatiblePointer - The assignment is between two pointers types that are not compatible,...
Definition: Sema.h:12128
clang::Sema::RecordDeclSetTy
llvm::SmallPtrSet< const CXXRecordDecl *, 8 > RecordDeclSetTy
Definition: Sema.h:1019
Specifiers.h
clang::Sema::ActOnStartDelayedCXXMethodDeclaration
void ActOnStartDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
ActOnStartDelayedCXXMethodDeclaration - We have completed parsing a top-level (non-nested) C++ class,...
Definition: SemaDeclCXX.cpp:10381
clang::Sema::CheckOverloadedOperatorDeclaration
bool CheckOverloadedOperatorDeclaration(FunctionDecl *FnDecl)
CheckOverloadedOperatorDeclaration - Check whether the declaration of this overloaded operator is wel...
Definition: SemaDeclCXX.cpp:15890
clang::Sema::GetFormatNSStringIdx
static bool GetFormatNSStringIdx(const FormatAttr *Format, unsigned &Idx)
Definition: SemaChecking.cpp:5265
clang::Sema::CompareReferenceRelationship
ReferenceCompareResult CompareReferenceRelationship(SourceLocation Loc, QualType T1, QualType T2, ReferenceConversions *Conv=nullptr)
CompareReferenceRelationship - Compare the two types T1 and T2 to determine whether they are referenc...
Definition: SemaOverload.cpp:4532
clang::Sema::NC_NonType
@ NC_NonType
The name was classified as a specific non-type, non-template declaration.
Definition: Sema.h:2736
clang::interp::APInt
llvm::APInt APInt
Definition: Integral.h:27
clang::Sema::ActOnInitList
ExprResult ActOnInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
Definition: SemaExpr.cpp:7331
clang::Sema::CleanupVarDeclMarking
void CleanupVarDeclMarking()
Definition: SemaExpr.cpp:18984
clang::Sema::isExternalWithNoLinkageType
bool isExternalWithNoLinkageType(ValueDecl *VD)
Determine if VD, which must be a variable or function, is an external symbol that nonetheless can't b...
Definition: Sema.cpp:826
clang::Sema::ArrayWithObjectsMethod
ObjCMethodDecl * ArrayWithObjectsMethod
The declaration of the arrayWithObjects:count: method.
Definition: Sema.h:1358
clang::Sema::DelayedDllExportMemberFunctions
SmallVector< CXXMethodDecl *, 4 > DelayedDllExportMemberFunctions
Definition: Sema.h:13545
clang::Sema::ConditionKind::Boolean
@ Boolean
A boolean condition, from 'if', 'while', 'for', or 'do'.
clang::Sema::ExpressionEvaluationContextRecord::ExpressionEvaluationContextRecord
ExpressionEvaluationContextRecord(ExpressionEvaluationContext Context, unsigned NumCleanupObjects, CleanupInfo ParentCleanup, Decl *ManglingContextDecl, ExpressionKind ExprContext)
Definition: Sema.h:1491
clang::Sema::ForVisibleRedeclaration
@ ForVisibleRedeclaration
The lookup results will be used for redeclaration of a name, if an entity by that name already exists...
Definition: Sema.h:4361
clang::Sema::ConstructOpenCLKernel
void ConstructOpenCLKernel(FunctionDecl *KernelCallerFunc, MangleContext &MC)
Definition: SemaSYCL.cpp:3659
clang::Sema::MergeSYCLIntelMaxGlobalWorkDimAttr
SYCLIntelMaxGlobalWorkDimAttr * MergeSYCLIntelMaxGlobalWorkDimAttr(Decl *D, const SYCLIntelMaxGlobalWorkDimAttr &A)
clang::DiagnosticBuilder
A little helper class used to produce diagnostics.
Definition: Diagnostic.h:1270
clang::Sema::deduceClosureReturnType
void deduceClosureReturnType(sema::CapturingScopeInfo &CSI)
Deduce a block or lambda's return type based on the return statements present in the body.
Definition: SemaLambda.cpp:697
clang::Sema::LoadExternalVTableUses
void LoadExternalVTableUses()
Load any externally-stored vtable uses.
Definition: SemaDeclCXX.cpp:17671
clang::Sema::TUKind
const TranslationUnitKind TUKind
The kind of translation unit we are processing.
Definition: Sema.h:1593
clang::Sema::GlobalMethodPool::count
int count(Selector Sel) const
Definition: Sema.h:1644
clang::Sema::PreferredConditionType
QualType PreferredConditionType(ConditionKind K) const
Definition: Sema.h:12566
clang::Sema::deduceOpenCLAddressSpace
void deduceOpenCLAddressSpace(ValueDecl *decl)
Definition: SemaDecl.cpp:6584
clang::Sema::UsesAllocatorsData::LParenLoc
SourceLocation LParenLoc
Locations of '(' and ')' symbols.
Definition: Sema.h:11933
clang::TemplateIdAnnotation
Information about a template-id annotation token.
Definition: ParsedTemplate.h:149
clang::Sema::ImplicitExceptionSpecification::CalledExpr
void CalledExpr(Expr *E)
Integrate an invoked expression into the collected data.
Definition: Sema.h:6276
clang::Sema::AvailabilityMergeKind
AvailabilityMergeKind
Describes the kind of merge to perform for availability attributes (including "deprecated",...
Definition: Sema.h:3636
clang::Sema::ActOnTypedefNameDecl
NamedDecl * ActOnTypedefNameDecl(Scope *S, DeclContext *DC, TypedefNameDecl *D, LookupResult &Previous, bool &Redeclaration)
ActOnTypedefNameDecl - Perform semantic checking for a declaration which declares a typedef-name,...
Definition: SemaDecl.cpp:6438
clang::Sema::CheckVectorCompareOperands
QualType CheckVectorCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
CheckVectorCompareOperands - vector comparisons are a clang extension that operates on extended vecto...
Definition: SemaExpr.cpp:12704
clang::Sema::DeferDiags
bool DeferDiags
Whether deferrable diagnostics should be deferred.
Definition: Sema.h:2064
clang::Sema::VisibleNamespaceCache
llvm::DenseMap< NamedDecl *, NamedDecl * > VisibleNamespaceCache
Map from the most recent declaration of a namespace to the most recent visible declaration of that na...
Definition: Sema.h:9227
clang::Sema::LookupLiteralOperator
LiteralOperatorLookupResult LookupLiteralOperator(Scope *S, LookupResult &R, ArrayRef< QualType > ArgTys, bool AllowRaw, bool AllowTemplate, bool AllowStringTemplate, bool DiagnoseMissing, StringLiteral *StringLit=nullptr)
LookupLiteralOperator - Determine which literal operator should be used for a user-defined literal,...
Definition: SemaLookup.cpp:3449
clang::SYCLIntegrationHeader::startKernel
void startKernel(const FunctionDecl *SyclKernel, QualType KernelNameType, SourceLocation Loc, bool IsESIMD, bool IsUnnamedKernel, int64_t ObjSize)
Signals that subsequent parameter descriptor additions will go to the kernel with given name.
Definition: SemaSYCL.cpp:4819
clang::Sema::NestedNameSpecInfo::NestedNameSpecInfo
NestedNameSpecInfo(IdentifierInfo *II, SourceLocation IdLoc, SourceLocation ColonColonLoc, QualType ObjectType)
Definition: Sema.h:6900
clang::Sema::CFT_Host
@ CFT_Host
Definition: Sema.h:12803
clang::Sema::ImmediateDiagBuilder::ImmediateDiagBuilder
ImmediateDiagBuilder(DiagnosticBuilder &&DB, Sema &SemaRef, unsigned DiagID)
Definition: Sema.h:1825
clang::Sema::mergeDLLImportAttr
DLLImportAttr * mergeDLLImportAttr(Decl *D, const AttributeCommonInfo &CI)
clang::Sema::CUDAFunctionTarget
CUDAFunctionTarget
Definition: Sema.h:12800
clang::LambdaIntroducer
Represents a complete lambda introducer.
Definition: DeclSpec.h:2667
clang::FunctionProtoType::ExceptionSpecInfo::NoexceptExpr
Expr * NoexceptExpr
Noexcept expression, if this is a computed noexcept specification.
Definition: Type.h:3965
clang::Sema::CheckRedeclarationExported
bool CheckRedeclarationExported(NamedDecl *New, NamedDecl *Old)
Definition: SemaDecl.cpp:1656
type
clang::Sema::AddSYCLAddIRAttributesFunctionAttr
void AddSYCLAddIRAttributesFunctionAttr(Decl *D, const AttributeCommonInfo &CI, MutableArrayRef< Expr * > Args)
clang::Sema::MarkVirtualMemberExceptionSpecsNeeded
void MarkVirtualMemberExceptionSpecsNeeded(SourceLocation Loc, const CXXRecordDecl *RD)
Mark the exception specifications of all virtual member functions in the given class as needed.
Definition: SemaDeclCXX.cpp:17847
clang::Sema::NSValueDecl
ObjCInterfaceDecl * NSValueDecl
The declaration of the Objective-C NSValue class.
Definition: Sema.h:1331
clang::Sema::ActOnOpenMPFilterClause
OMPClause * ActOnOpenMPFilterClause(Expr *ThreadID, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'filter' clause.
Definition: SemaOpenMP.cpp:16894
clang::Sema::CodeCompleteDeclSpec
void CodeCompleteDeclSpec(Scope *S, DeclSpec &DS, bool AllowNonIdentifiers, bool AllowNestedNameSpecifiers)
Definition: SemaCodeComplete.cpp:4380
clang::Sema::SubstSpaceshipAsEqualEqual
FunctionDecl * SubstSpaceshipAsEqualEqual(CXXRecordDecl *RD, FunctionDecl *Spaceship)
Substitute the name and return type of a defaulted 'operator<=>' to form an implicit 'operator=='.
Definition: SemaTemplateInstantiateDecl.cpp:4348
clang::Sema::TemplateParameterListsAreEqual
bool TemplateParameterListsAreEqual(TemplateParameterList *New, TemplateParameterList *Old, bool Complain, TemplateParameterListEqualKind Kind, SourceLocation TemplateArgLoc=SourceLocation())
Determine whether the given template parameter lists are equivalent.
Definition: SemaTemplate.cpp:7824
clang::Sema::MergeSYCLIntelNoGlobalWorkOffsetAttr
SYCLIntelNoGlobalWorkOffsetAttr * MergeSYCLIntelNoGlobalWorkOffsetAttr(Decl *D, const SYCLIntelNoGlobalWorkOffsetAttr &A)
clang::Sema::DeviceDeferredDiags
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, std::vector< DeviceDeferredDiagnostic > > DeviceDeferredDiags
Diagnostics that are emitted only if we discover that the given function must be codegen'ed.
Definition: Sema.h:12705
clang::Sema::CanPerformAggregateInitializationForOverloadResolution
bool CanPerformAggregateInitializationForOverloadResolution(const InitializedEntity &Entity, InitListExpr *From)
Determine whether we can perform aggregate initialization for the purposes of overload resolution.
Definition: SemaInit.cpp:3142
clang::Sema::BuildDeclRefExpr
DeclRefExpr * BuildDeclRefExpr(ValueDecl *D, QualType Ty, ExprValueKind VK, SourceLocation Loc, const CXXScopeSpec *SS=nullptr)
Definition: SemaExpr.cpp:2010
clang::Sema::HandlePropertyInClassExtension
ObjCPropertyDecl * HandlePropertyInClassExtension(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, unsigned &Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind)
Called by ActOnProperty to handle @property declarations in class extensions.
Definition: SemaObjCProperty.cpp:405
clang::Sema::ObjCSuperMessage
@ ObjCSuperMessage
The message is sent to 'super'.
Definition: Sema.h:10220
clang::Sema::checkOpenMPDeclareVariantFunction
Optional< std::pair< FunctionDecl *, Expr * > > checkOpenMPDeclareVariantFunction(DeclGroupPtrTy DG, Expr *VariantRef, OMPTraitInfo &TI, unsigned NumAppendArgs, SourceRange SR)
Checks '#pragma omp declare variant' variant function and original functions after parsing of the ass...
Definition: SemaOpenMP.cpp:7024
clang::Sema::ActOnPragmaUnused
void ActOnPragmaUnused(const Token &Identifier, Scope *curScope, SourceLocation PragmaLoc)
ActOnPragmaUnused - Called on well-formed '#pragma unused'.
Definition: SemaAttr.cpp:738
clang::Sema::IsBlockPointerConversion
bool IsBlockPointerConversion(QualType FromType, QualType ToType, QualType &ConvertedType)
Definition: SemaOverload.cpp:2758
clang::Sema::pushCodeSynthesisContext
void pushCodeSynthesisContext(CodeSynthesisContext Ctx)
Definition: SemaTemplateInstantiate.cpp:424
clang::Sema::LookupLocalFriendName
@ LookupLocalFriendName
Look up a friend of a local class.
Definition: Sema.h:4340
clang::Sema::IncompatibleBlockPointer
@ IncompatibleBlockPointer
IncompatibleBlockPointer - The assignment is between two block pointers types that are not compatible...
Definition: Sema.h:12172
clang::UnresolvedSetImpl
A set of unresolved declarations.
Definition: UnresolvedSet.h:61
clang::Sema::CheckInstantiatedFunctionTemplateConstraints
bool CheckInstantiatedFunctionTemplateConstraints(SourceLocation PointOfInstantiation, FunctionDecl *Decl, ArrayRef< TemplateArgument > TemplateArgs, ConstraintSatisfaction &Satisfaction)
Definition: SemaConcept.cpp:412
clang::Sema::CXXThisScopeRAII
RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers...
Definition: Sema.h:6597
clang::Sema::SubstParmTypes
bool SubstParmTypes(SourceLocation Loc, ArrayRef< ParmVarDecl * > Params, const FunctionProtoType::ExtParameterInfo *ExtParamInfos, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< QualType > &ParamTypes, SmallVectorImpl< ParmVarDecl * > *OutParams, ExtParameterInfoBuilder &ParamInfos)
Substitute the given template arguments into the given set of parameters, producing the set of parame...
Definition: SemaTemplateInstantiate.cpp:2550
clang::SourceLocExpr::IdentKind
IdentKind
Definition: Expr.h:4741
clang::Sema::CheckStaticArrayArgument
void CheckStaticArrayArgument(SourceLocation CallLoc, ParmVarDecl *Param, const Expr *ArgExpr)
CheckStaticArrayArgument - If the given argument corresponds to a static array parameter,...
Definition: SemaExpr.cpp:6258
clang::Sema::FunctionScopeRAII::FunctionScopeRAII
FunctionScopeRAII(Sema &S)
Definition: Sema.h:5032
clang::Sema::MergeSYCLIntelSchedulerTargetFmaxMhzAttr
SYCLIntelSchedulerTargetFmaxMhzAttr * MergeSYCLIntelSchedulerTargetFmaxMhzAttr(Decl *D, const SYCLIntelSchedulerTargetFmaxMhzAttr &A)
clang::Sema::SubstDefaultTemplateArgumentIfAvailable
TemplateArgumentLoc SubstDefaultTemplateArgumentIfAvailable(TemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, Decl *Param, SmallVectorImpl< TemplateArgument > &Converted, bool &HasDefaultArg)
If the given template parameter has a default template argument, substitute into that default templat...
Definition: SemaTemplate.cpp:5244
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::isEqual
static bool isEqual(const FunctionDeclAndLoc &LHS, const FunctionDeclAndLoc &RHS)
Definition: Sema.h:13880
clang::Sema::OS_Array
@ OS_Array
Definition: Sema.h:3955
clang::Sema::TypoDiagnosticGenerator
std::function< void(const TypoCorrection &)> TypoDiagnosticGenerator
Definition: Sema.h:4409
clang::Sema::BuildCoroutineBodyStmt
StmtResult BuildCoroutineBodyStmt(CoroutineBodyStmt::CtorArgs)
Definition: SemaCoroutine.cpp:1675
clang::Sema::KernelCallUndefinedFunction
@ KernelCallUndefinedFunction
Definition: Sema.h:13691
clang::Sema::ActOnCXXTryBlock
StmtResult ActOnCXXTryBlock(SourceLocation TryLoc, Stmt *TryBlock, ArrayRef< Stmt * > Handlers)
ActOnCXXTryBlock - Takes a try compound-statement and a number of handlers and creates a try statemen...
Definition: SemaStmt.cpp:4441
clang::Sema::isMemberAccessibleForDeletion
bool isMemberAccessibleForDeletion(CXXRecordDecl *NamingClass, DeclAccessPair Found, QualType ObjectType)
Definition: Sema.h:7781
clang::Sema::TypeDiagnoser
Abstract class used to diagnose incomplete types.
Definition: Sema.h:2370
clang::Sema::ActOnParenListExpr
ExprResult ActOnParenListExpr(SourceLocation L, SourceLocation R, MultiExprArg Val)
Definition: SemaExpr.cpp:8070
clang::Sema::CallingConventionIgnoredReason::ForThisTarget
@ ForThisTarget
clang::Sema::ActOnOpenMPExclusiveClause
OMPClause * ActOnOpenMPExclusiveClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'exclusive' clause.
Definition: SemaOpenMP.cpp:22573
clang::Sema::CheckMessageArgumentTypes
bool CheckMessageArgumentTypes(const Expr *Receiver, QualType ReceiverType, MultiExprArg Args, Selector Sel, ArrayRef< SourceLocation > SelectorLocs, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage, SourceLocation lbrac, SourceLocation rbrac, SourceRange RecRange, QualType &ReturnType, ExprValueKind &VK)
CheckMessageArgumentTypes - Check types in an Obj-C message send.
Definition: SemaExprObjC.cpp:1712
clang::Sema::FunctionVoidPointer
@ FunctionVoidPointer
FunctionVoidPointer - The assignment is between a function pointer and void*, which the standard does...
Definition: Sema.h:12124
clang::Sema::inferGslOwnerPointerAttribute
void inferGslOwnerPointerAttribute(CXXRecordDecl *Record)
Add [[gsl::Owner]] and [[gsl::Pointer]] attributes for std:: types.
Definition: SemaAttr.cpp:164
clang::Sema::NSStringDecl
ObjCInterfaceDecl * NSStringDecl
The declaration of the Objective-C NSString class.
Definition: Sema.h:1343
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:210
clang::Sema::ActOnUsingDirective
Decl * ActOnUsingDirective(Scope *CurScope, SourceLocation UsingLoc, SourceLocation NamespcLoc, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *NamespcName, const ParsedAttributesView &AttrList)
Definition: SemaDeclCXX.cpp:11644
clang::Sema::AlignPackInfo::IsXLStack
bool IsXLStack() const
Definition: Sema.h:730
clang::Sema::stripARCUnbridgedCast
Expr * stripARCUnbridgedCast(Expr *e)
stripARCUnbridgedCast - Given an expression of ARCUnbridgedCast type, remove the placeholder cast.
Definition: SemaExprObjC.cpp:4547
clang::Sema::InventedParameterInfosStart
unsigned InventedParameterInfosStart
The index of the first InventedParameterInfo that refers to the current context.
Definition: Sema.h:981
clang::Sema::CodeCompleteCase
void CodeCompleteCase(Scope *S)
Definition: SemaCodeComplete.cpp:5838
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::Sema::ActOnStartCategoryImplementation
Decl * ActOnStartCategoryImplementation(SourceLocation AtCatImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *CatName, SourceLocation CatLoc, const ParsedAttributesView &AttrList)
ActOnStartCategoryImplementation - Perform semantic checks on the category implementation declaration...
Definition: SemaDeclObjC.cpp:1898
clang::Sema::ActOnGNUNullExpr
ExprResult ActOnGNUNullExpr(SourceLocation TokenLoc)
Definition: SemaExpr.cpp:16382
clang::Sema::ActOnEndOfTranslationUnit
void ActOnEndOfTranslationUnit()
ActOnEndOfTranslationUnit - This is called at the very end of the translation unit when EOF is reache...
Definition: Sema.cpp:1159
clang::Sema::AllowFoldKind
AllowFoldKind
Definition: Sema.h:12642
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1355
clang::Sema::AbstractNone
@ AbstractNone
Definition: Sema.h:7800
clang::Sema::ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope
void ActOnFinishedFunctionDefinitionInOpenMPDeclareVariantScope(Decl *D, SmallVectorImpl< FunctionDecl * > &Bases)
Register D as specialization of all base functions in Bases in the current omp begin/end declare vari...
Definition: SemaOpenMP.cpp:6889
clang::Sema::RequireNonAbstractType
bool RequireNonAbstractType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
Definition: Sema.h:7814
clang::Sema::getFixItZeroLiteralForType
std::string getFixItZeroLiteralForType(QualType T, SourceLocation Loc) const
Definition: SemaFixItUtils.cpp:219
clang::Sema::ActOnOpenMPRequiresDirective
DeclGroupPtrTy ActOnOpenMPRequiresDirective(SourceLocation Loc, ArrayRef< OMPClause * > ClauseList)
Called on well-formed '#pragma omp requires'.
Definition: SemaOpenMP.cpp:3230
clang::Sema::CheckExtVectorCast
ExprResult CheckExtVectorCast(SourceRange R, QualType DestTy, Expr *CastExpr, CastKind &Kind)
Definition: SemaExpr.cpp:7860
clang::Sema::mergeMinSizeAttr
MinSizeAttr * mergeMinSizeAttr(Decl *D, const AttributeCommonInfo &CI)
clang::Sema::ActOnSimpleRequirement
concepts::Requirement * ActOnSimpleRequirement(Expr *E)
Definition: SemaExprCXX.cpp:8755
clang::Sema::CallingConventionIgnoredReason::BuiltinFunction
@ BuiltinFunction
clang::Sema::ActOnOpenMPFullClause
OMPClause * ActOnOpenMPFullClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-form 'full' clauses.
Definition: SemaOpenMP.cpp:16136
clang::Sema::ActOnCXXBoolLiteral
ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind)
ActOnCXXBoolLiteral - Parse {true,false} literals.
Definition: SemaExprCXX.cpp:805
OpenCLOptions.h
clang::sema::AnalysisBasedWarnings
Definition: AnalysisBasedWarnings.h:31
clang::Sema::TyposCorrected
unsigned TyposCorrected
The number of typos corrected by CorrectTypo.
Definition: Sema.h:9588
clang::CXXConversionDecl
Represents a C++ conversion function within a class.
Definition: DeclCXX.h:2751
clang::Sema::ActOnEnumConstant
Decl * ActOnEnumConstant(Scope *S, Decl *EnumDecl, Decl *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, const ParsedAttributesView &Attrs, SourceLocation EqualLoc, Expr *Val)
Definition: SemaDecl.cpp:18265
clang::Sema::UPPC_IfNotExists
@ UPPC_IfNotExists
Microsoft __if_not_exists.
Definition: Sema.h:8492
clang::Sema::FST_Unknown
@ FST_Unknown
Definition: Sema.h:13331
clang::Decl::hasAttr
bool hasAttr() const
Definition: DeclBase.h:541
clang::Sema::ActOnStartLinkageSpecification
Decl * ActOnStartLinkageSpecification(Scope *S, SourceLocation ExternLoc, Expr *LangStr, SourceLocation LBraceLoc)
ActOnStartLinkageSpecification - Parsed the beginning of a C++ linkage specification,...
Definition: SemaDeclCXX.cpp:16277
clang::VarDecl::hasGlobalStorage
bool hasGlobalStorage() const
Returns true for all variables that do not have local storage.
Definition: Decl.h:1142
clang::Sema::ActOnLambdaExplicitTemplateParameterList
void ActOnLambdaExplicitTemplateParameterList(SourceLocation LAngleLoc, ArrayRef< NamedDecl * > TParams, SourceLocation RAngleLoc, ExprResult RequiresClause)
This is called after parsing the explicit template parameter list on a lambda (if it exists) in C++2a...
Definition: SemaLambda.cpp:522
clang::TypoCorrection
Simple class containing the result of Sema::CorrectTypo.
Definition: TypoCorrection.h:42
clang::Sema::MergeIntelFPGANumBanksAttr
IntelFPGANumBanksAttr * MergeIntelFPGANumBanksAttr(Decl *D, const IntelFPGANumBanksAttr &A)
clang::Sema::ContextualImplicitConverter::diagnoseConversion
virtual SemaDiagnosticBuilder diagnoseConversion(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy)=0
Emits a diagnostic when we picked a conversion function (for cases when we are not allowed to pick a ...
clang::Sema::AMK_Override
@ AMK_Override
Merge availability attributes for an override, which requires an exact match or a weakening of constr...
Definition: Sema.h:3644
clang::Sema::DelayedDiagnostics::DelayedDiagnostics
DelayedDiagnostics()
Definition: Sema.h:1110
clang::Sema::ActOnOpenMPTargetDirective
StmtResult ActOnOpenMPTargetDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12514
clang::Sema::ActOnPragmaMSInitSeg
void ActOnPragmaMSInitSeg(SourceLocation PragmaLocation, StringLiteral *SegmentName)
Called on well-formed #pragma init_seg().
Definition: SemaAttr.cpp:729
clang::Sema::DiagnoseMultipleUserDefinedConversion
bool DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType)
Definition: SemaOverload.cpp:3646
clang::Sema::UPPC_DeclarationType
@ UPPC_DeclarationType
The type of an arbitrary declaration.
Definition: Sema.h:8447
clang::Sema::ActOnParamDefaultArgument
void ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc, Expr *defarg)
ActOnParamDefaultArgument - Check whether the default argument provided for a function parameter is w...
Definition: SemaDeclCXX.cpp:308
clang::Sema::getIdentityTemplateArgumentLoc
TemplateArgumentLoc getIdentityTemplateArgumentLoc(NamedDecl *Param, SourceLocation Location)
Get a template argument mapping the given template parameter to itself, e.g.
Definition: SemaTemplateDeduction.cpp:2558
clang::Sema::DiagnoseSentinelCalls
void DiagnoseSentinelCalls(NamedDecl *D, SourceLocation Loc, ArrayRef< Expr * > Args)
DiagnoseSentinelCalls - This routine checks whether a call or message-send is to a declaration with t...
Definition: SemaExpr.cpp:443
clang::Sema::isOpenMPTargetCapturedDecl
bool isOpenMPTargetCapturedDecl(const ValueDecl *D, unsigned Level, unsigned CaptureLevel) const
Check if the specified variable is captured by 'target' directive.
Definition: SemaOpenMP.cpp:2441
clang::Sema::BuildSYCLBuiltinFieldTypeExpr
ExprResult BuildSYCLBuiltinFieldTypeExpr(SourceLocation Loc, QualType SourceTy, Expr *Idx)
Definition: SemaSYCL.cpp:180
clang::Sema::DeclareImplicitMoveConstructor
CXXConstructorDecl * DeclareImplicitMoveConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit move constructor for the given class.
Definition: SemaDeclCXX.cpp:15180
clang::Sema::MarkMemberReferenced
void MarkMemberReferenced(MemberExpr *E)
Perform reference-marking and odr-use handling for a MemberExpr.
Definition: SemaExpr.cpp:19249
clang::Sema::CheckFloatComparison
void CheckFloatComparison(SourceLocation Loc, Expr *LHS, Expr *RHS, BinaryOperatorKind Opcode)
Check for comparisons of floating-point values using == and !=.
Definition: SemaChecking.cpp:11585
clang::Sema::CurInitSeg
StringLiteral * CurInitSeg
Last section used with #pragma init_seg.
Definition: Sema.h:901
clang::Sema::LookupInstanceMethodInGlobalPool
ObjCMethodDecl * LookupInstanceMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
LookupInstanceMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
Definition: Sema.h:4934
clang::ObjCImplementationDecl
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition: DeclObjC.h:2545
clang::Sema::getASTContext
ASTContext & getASTContext() const
Definition: Sema.h:1781
clang::OverloadCandidateParamOrder
OverloadCandidateParamOrder
The parameter ordering that will be used for the candidate.
Definition: Overload.h:85
clang::Sema::LookupCopyingAssignment
CXXMethodDecl * LookupCopyingAssignment(CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
Look up the copying assignment operator for the given class.
Definition: SemaLookup.cpp:3398
clang::Sema::isOpenMPCapturedDecl
VarDecl * isOpenMPCapturedDecl(ValueDecl *D, bool CheckScopeInfo=false, unsigned StopAt=0)
Check if the specified variable is used in one of the private clauses (private, firstprivate,...
Definition: SemaOpenMP.cpp:2189
clang::Sema::NTCUC_Assignment
@ NTCUC_Assignment
Definition: Sema.h:3100
clang::Sema::ActOnFinishCXXNonNestedClass
void ActOnFinishCXXNonNestedClass()
Definition: SemaDeclCXX.cpp:13836
clang::Sema::BFRK_Build
@ BFRK_Build
Initial building of a for-range statement.
Definition: Sema.h:5102
clang::Sema::FreeVisContext
void FreeVisContext()
FreeVisContext - Deallocate and null out VisContext.
Definition: SemaAttr.cpp:1106
clang::Sema::ActOnOpenMPSafelenClause
OMPClause * ActOnOpenMPSafelenClause(Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'safelen' clause.
Definition: SemaOpenMP.cpp:15743
clang::Sema::getCurFunction
sema::FunctionScopeInfo * getCurFunction() const
Definition: Sema.h:2163
clang::Sema::InstantiateVariableDefinition
void InstantiateVariableDefinition(SourceLocation PointOfInstantiation, VarDecl *Var, bool Recursive=false, bool DefinitionRequired=false, bool AtEndOfTU=false)
Instantiate the definition of the given variable from its template.
Definition: SemaTemplateInstantiateDecl.cpp:5778
clang::Sema::SemaDiagnosticBuilder::Kind
Kind
Definition: Sema.h:1942
clang::Sema::CheckAddressOfOperand
QualType CheckAddressOfOperand(ExprResult &Operand, SourceLocation OpLoc)
CheckAddressOfOperand - The operand of & must be either a function designator or an lvalue designatin...
Definition: SemaExpr.cpp:14022
clang::Sema::ActOnOpenMPDetachClause
OMPClause * ActOnOpenMPDetachClause(Expr *Evt, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'detach' clause.
Definition: SemaOpenMP.cpp:21728
clang::Sema::ActOnOpenMPNovariantsClause
OMPClause * ActOnOpenMPNovariantsClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'novariants' clause.
Definition: SemaOpenMP.cpp:16832
clang::Sema::getTrivialTemplateArgumentLoc
TemplateArgumentLoc getTrivialTemplateArgumentLoc(const TemplateArgument &Arg, QualType NTTPType, SourceLocation Loc)
Allocate a TemplateArgumentLoc where all locations have been initialized to the given location.
Definition: SemaTemplateDeduction.cpp:2496
clang::Sema::SourceMgr
SourceManager & SourceMgr
Definition: Sema.h:590
clang::TemplateNameKind
TemplateNameKind
Specifies the kind of template name that an identifier refers to.
Definition: TemplateKinds.h:20
clang::Sema::OSMK_New
@ OSMK_New
Definition: Sema.h:10157
clang::Sema::AddKnownFunctionAttributes
void AddKnownFunctionAttributes(FunctionDecl *FD)
Adds any function attributes that we know a priori based on the declaration of this function.
Definition: SemaDecl.cpp:15314
clang::Sema::ActOnStartClassInterface
Decl * ActOnStartClassInterface(Scope *S, SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
Definition: SemaDeclObjC.cpp:974
clang::Sema::handleDelayedAvailabilityCheck
void handleDelayedAvailabilityCheck(sema::DelayedDiagnostic &DD, Decl *Ctx)
Definition: SemaAvailability.cpp:542
clang::Sema::BuildSYCLIntelFPGAInitiationIntervalAttr
SYCLIntelFPGAInitiationIntervalAttr * BuildSYCLIntelFPGAInitiationIntervalAttr(const AttributeCommonInfo &CI, Expr *E)
Definition: SemaStmtAttr.cpp:101
clang::Sema::NTCUC_LValueToRValueVolatile
@ NTCUC_LValueToRValueVolatile
Definition: Sema.h:3106
clang::Sema::ThreadSafetyDeclCache
threadSafety::BeforeSet * ThreadSafetyDeclCache
Definition: Sema.h:9600
clang::Sema::DataSegStack
PragmaStack< StringLiteral * > DataSegStack
Definition: Sema.h:867
clang::Sema::ActOnCXXTypeid
ExprResult ActOnCXXTypeid(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
ActOnCXXTypeid - Parse typeid( something ).
Definition: SemaExprCXX.cpp:638
clang::Sema::CodeCompleteObjCProtocolReferences
void CodeCompleteObjCProtocolReferences(ArrayRef< IdentifierLocPair > Protocols)
Definition: SemaCodeComplete.cpp:8281
clang::Sema::CheckVariableDeclarationType
void CheckVariableDeclarationType(VarDecl *NewVD)
Definition: SemaDecl.cpp:8138
clang::Sema::BuildCoreturnStmt
StmtResult BuildCoreturnStmt(SourceLocation KwLoc, Expr *E, bool IsImplicit=false)
Definition: SemaCoroutine.cpp:967
clang::Sema::AddInstanceMethodToGlobalPool
void AddInstanceMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false)
AddInstanceMethodToGlobalPool - All instance methods in a translation unit are added to a global pool...
Definition: Sema.h:4919
clang::Sema::isMicrosoftMissingTypename
bool isMicrosoftMissingTypename(const CXXScopeSpec *SS, Scope *S)
isMicrosoftMissingTypename - In Microsoft mode, within class scope, if a CXXScopeSpec's type is equal...
Definition: SemaDecl.cpp:664
clang::Sema::ICEConvertDiagnoser::ICEConvertDiagnoser
ICEConvertDiagnoser(bool AllowScopedEnumerations, bool Suppress, bool SuppressConversion)
Definition: Sema.h:3930
clang::Sema::checkNonTrivialCUnionInInitializer
void checkNonTrivialCUnionInInitializer(const Expr *Init, SourceLocation Loc)
Emit diagnostics if the initializer or any of its explicit or implicitly-generated subexpressions req...
Definition: SemaDecl.cpp:12095
clang::Sema::OSMK_Alloc
@ OSMK_Alloc
Definition: Sema.h:10156
clang::Sema::checkDeclIsAllowedInOpenMPTarget
void checkDeclIsAllowedInOpenMPTarget(Expr *E, Decl *D, SourceLocation IdLoc=SourceLocation())
Check declaration inside target region.
Definition: SemaOpenMP.cpp:22069
clang::ExternalSemaSource::ReadDelegatingConstructors
virtual void ReadDelegatingConstructors(SmallVectorImpl< CXXConstructorDecl * > &Decls)
Read the set of delegating constructors known to the external Sema source.
Definition: ExternalSemaSource.h:125
clang::Sema::CXXTypeInfoDecl
RecordDecl * CXXTypeInfoDecl
The C++ "type_info" declaration, which is defined in <typeinfo>.
Definition: Sema.h:1319
clang::Sema::ActOnDecltypeExpression
ExprResult ActOnDecltypeExpression(Expr *E)
Process the expression contained within a decltype.
Definition: SemaExprCXX.cpp:7203
clang::Sema::NameClassification::OverloadSet
static NameClassification OverloadSet(ExprResult E)
Definition: Sema.h:2786
clang::Sema::AlignPackInfo::IsPackSet
bool IsPackSet() const
Definition: Sema.h:724
clang::Sema::CTK_NonError
@ CTK_NonError
Definition: Sema.h:4543
clang::Sema::ArgumentPackSubstitutionIndex
int ArgumentPackSubstitutionIndex
The current index into pack expansion arguments that will be used for substitution of parameter packs...
Definition: Sema.h:9267
clang::Sema::ActOnPragmaMSSeg
void ActOnPragmaMSSeg(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, StringLiteral *SegmentName, llvm::StringRef PragmaName)
Called on well formed #pragma bss_seg/data_seg/const_seg/code_seg.
Definition: SemaAttr.cpp:697
clang::Sema::NameClassification::NameClassification
NameClassification(const IdentifierInfo *Keyword)
Definition: Sema.h:2776
clang::Sema::VariadicMethod
@ VariadicMethod
Definition: Sema.h:12027
clang::Sema::BuildSYCLIntelFPGAMaxInterleavingAttr
SYCLIntelFPGAMaxInterleavingAttr * BuildSYCLIntelFPGAMaxInterleavingAttr(const AttributeCommonInfo &CI, Expr *E)
Definition: SemaStmtAttr.cpp:130
clang::UsingDirectiveDecl
Represents C++ using-directive.
Definition: DeclCXX.h:2902
clang::Sema::OS_Error
@ OS_Error
Definition: Sema.h:3957
clang::Sema::BuildDependentDeclRefExpr
ExprResult BuildDependentDeclRefExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaTemplate.cpp:766
clang::Sema::checkCUDATargetOverload
void checkCUDATargetOverload(FunctionDecl *NewFD, const LookupResult &Previous)
Check whether NewFD is a valid overload for CUDA.
Definition: SemaCUDA.cpp:906
clang::Sema::ExpressionEvaluationContext::UnevaluatedAbstract
@ UnevaluatedAbstract
The current expression occurs within an unevaluated operand that unconditionally permits abstract ref...
clang::Sema::ActOnIdExpression
ExprResult ActOnIdExpression(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool HasTrailingLParen, bool IsAddressOfOperand, CorrectionCandidateCallback *CCC=nullptr, bool IsInlineAsmIdentifier=false, Token *KeywordReplacement=nullptr)
Definition: SemaExpr.cpp:2495
clang::Sema::ActOnCXXExitDeclInitializer
void ActOnCXXExitDeclInitializer(Scope *S, Decl *Dcl)
ActOnCXXExitDeclInitializer - Invoked after we are finished parsing an initializer for the declaratio...
Definition: SemaDeclCXX.cpp:17635
clang::Sema::getPrintable
static DeclarationName getPrintable(DeclarationName N)
Definition: Sema.h:2386
clang::Sema::RequireCompleteDeclContext
bool RequireCompleteDeclContext(CXXScopeSpec &SS, DeclContext *DC)
Require that the context specified by SS be complete.
Definition: SemaCXXScopeSpec.cpp:199
clang::Sema::LookupFactoryMethodInGlobalPool
ObjCMethodDecl * LookupFactoryMethodInGlobalPool(Selector Sel, SourceRange R, bool receiverIdOrClass=false)
LookupFactoryMethodInGlobalPool - Returns the method and warns if there are multiple signatures.
Definition: Sema.h:4942
clang::Sema::MergeVarDeclExceptionSpecs
void MergeVarDeclExceptionSpecs(VarDecl *New, VarDecl *Old)
Merge the exception specifications of two variable declarations.
Definition: SemaDeclCXX.cpp:1544
clang::Sema::KernelCallVirtualFunction
@ KernelCallVirtualFunction
Definition: Sema.h:13683
clang::Sema::ObjCSpecialMethodKind
ObjCSpecialMethodKind
Definition: Sema.h:10154
clang::Sema::ConvertArgumentsForCall
bool ConvertArgumentsForCall(CallExpr *Call, Expr *Fn, FunctionDecl *FDecl, const FunctionProtoType *Proto, ArrayRef< Expr * > Args, SourceLocation RParenLoc, bool ExecConfig=false)
ConvertArgumentsForCall - Converts the arguments specified in Args/NumArgs to the parameter types of ...
Definition: SemaExpr.cpp:6019
clang::Sema::NoteDeletedFunction
void NoteDeletedFunction(FunctionDecl *FD)
Emit a note explaining that this function is deleted.
Definition: SemaExpr.cpp:110
clang::Sema::SYCLDiagIfDeviceCode
SemaDiagnosticBuilder SYCLDiagIfDeviceCode(SourceLocation Loc, unsigned DiagID, DeviceDiagnosticReason Reason=DeviceDiagnosticReason::Sycl|DeviceDiagnosticReason::Esimd)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
Definition: SemaSYCL.cpp:3991
clang::BindingDecl
A binding in a decomposition declaration.
Definition: DeclCXX.h:3979
clang::Sema::CallExprUnaryConversions
ExprResult CallExprUnaryConversions(Expr *E)
CallExprUnaryConversions - a special case of an unary conversion performed on a function designator o...
Definition: SemaExpr.cpp:789
clang::Sema::AreMultipleMethodsInGlobalPool
bool AreMultipleMethodsInGlobalPool(Selector Sel, ObjCMethodDecl *BestMethod, SourceRange R, bool receiverIdOrClass, SmallVectorImpl< ObjCMethodDecl * > &Methods)
Definition: SemaDeclObjC.cpp:3538
clang::Sema::AddNonMemberOperatorCandidates
void AddNonMemberOperatorCandidates(const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
Add all of the non-member operator function declarations in the given function set to the overload ca...
Definition: SemaOverload.cpp:7689
clang::Sema::forRedeclarationInCurContext
RedeclarationKind forRedeclarationInCurContext()
Definition: Sema.h:4368
clang::Sema::ActOnPragmaFloatControl
void ActOnPragmaFloatControl(SourceLocation Loc, PragmaMsStackAction Action, PragmaFloatControlKind Value)
ActOnPragmaFloatControl - Call on well-formed #pragma float_control.
Definition: SemaAttr.cpp:494
clang::Sema::actOnObjCTypeParam
DeclResult actOnObjCTypeParam(Scope *S, ObjCTypeParamVariance variance, SourceLocation varianceLoc, unsigned index, IdentifierInfo *paramName, SourceLocation paramLoc, SourceLocation colonLoc, ParsedType typeBound)
Definition: SemaDeclObjC.cpp:666
clang::Sema::ActOnOpenMPTargetParallelGenericLoopDirective
StmtResult ActOnOpenMPTargetParallelGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10375
clang::Sema::ActOnRequiresExpr
ExprResult ActOnRequiresExpr(SourceLocation RequiresKWLoc, RequiresExprBodyDecl *Body, ArrayRef< ParmVarDecl * > LocalParameters, ArrayRef< concepts::Requirement * > Requirements, SourceLocation ClosingBraceLoc)
Definition: SemaExprCXX.cpp:8960
clang::Sema::LOLR_StringTemplatePack
@ LOLR_StringTemplatePack
The lookup found an overload set of literal operator templates, which expect the character type and c...
Definition: Sema.h:4398
clang::Sema::CheckOverridingFunctionExceptionSpec
bool CheckOverridingFunctionExceptionSpec(const CXXMethodDecl *New, const CXXMethodDecl *Old)
CheckOverridingFunctionExceptionSpec - Checks whether the exception spec is a subset of base spec.
Definition: SemaExceptionSpec.cpp:960
clang::Sema::InventedParameterInfos
SmallVector< InventedTemplateParameterInfo, 4 > InventedParameterInfos
Stack containing information needed when in C++2a an 'auto' is encountered in a function declaration ...
Definition: Sema.h:977
llvm::SmallVector
Definition: LLVM.h:38
clang::Sema::ACR_unbridged
@ ACR_unbridged
Definition: Sema.h:12467
clang::Sema::UsesAllocatorsData::Allocator
Expr * Allocator
Allocator.
Definition: Sema.h:11929
clang::Sema::ActOnBreakStmt
StmtResult ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope)
Definition: SemaStmt.cpp:3327
clang::Sema::PushForceCUDAHostDevice
void PushForceCUDAHostDevice()
Increments our count of the number of times we've seen a pragma forcing functions to be host device.
Definition: SemaCUDA.cpp:37
clang::Sema::BoundTypeDiagnoser::DiagID
unsigned DiagID
Definition: Sema.h:2395
clang::Sema::getFixItZeroInitializerForType
std::string getFixItZeroInitializerForType(QualType T, SourceLocation Loc) const
Get a string to suggest for zero-initialization of a type.
Definition: SemaFixItUtils.cpp:200
clang::Sema::CFP_WrongSide
@ CFP_WrongSide
Definition: Sema.h:12837
clang::Sema::mergeAlwaysInlineAttr
AlwaysInlineAttr * mergeAlwaysInlineAttr(Decl *D, const AttributeCommonInfo &CI, const IdentifierInfo *Ident)
clang::Sema::isObjCWritebackConversion
bool isObjCWritebackConversion(QualType FromType, QualType ToType, QualType &ConvertedType)
Determine whether this is an Objective-C writeback conversion, used for parameter passing when perfor...
Definition: SemaOverload.cpp:2700
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::Sema::ModuleDeclKind::Interface
@ Interface
'export module X;'
clang::Sema::ActOnOpenMPDeclareReductionType
QualType ActOnOpenMPDeclareReductionType(SourceLocation TyLoc, TypeResult ParsedType)
Check if the specified type is allowed to be used in 'omp declare reduction' construct.
Definition: SemaOpenMP.cpp:21173
clang::Sema::OriginalCallArg::DecomposedParam
bool DecomposedParam
Definition: Sema.h:8889
clang::Sema::CodeSynthesisContext::ParameterMappingSubstitution
@ ParameterMappingSubstitution
Definition: Sema.h:9127
clang::Sema::FunctionScopes
SmallVector< sema::FunctionScopeInfo *, 4 > FunctionScopes
Stack containing information about each of the nested function, block, and method scopes that are cur...
Definition: Sema.h:961
clang::Sema::BuildObjCDictionaryLiteral
ExprResult BuildObjCDictionaryLiteral(SourceRange SR, MutableArrayRef< ObjCDictionaryElement > Elements)
Definition: SemaExprObjC.cpp:953
clang::Sema::InvalidLogicalVectorOperands
QualType InvalidLogicalVectorOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
Definition: SemaExpr.cpp:10073
clang::Sema::CodeSynthesisContext::PointOfInstantiation
SourceLocation PointOfInstantiation
The point of instantiation or synthesis within the source code.
Definition: Sema.h:9149
clang::Sema::ActOnCXXForRangeDecl
void ActOnCXXForRangeDecl(Decl *D)
Definition: SemaDecl.cpp:13170
clang::Sema::ActOnBinOp
ExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc, tok::TokenKind Kind, Expr *LHSExpr, Expr *RHSExpr)
Definition: SemaExpr.cpp:15040
clang::Sema::CheckFriendAccess
AccessResult CheckFriendAccess(NamedDecl *D)
Checks access to the target of a friend declaration.
Definition: SemaAccess.cpp:1806
clang::Sema::ActOnPragmaDetectMismatch
void ActOnPragmaDetectMismatch(SourceLocation Loc, StringRef Name, StringRef Value)
ActOnPragmaDetectMismatch - Call on well-formed #pragma detect_mismatch.
Definition: SemaAttr.cpp:465
clang::Sema::targetDiag
SemaDiagnosticBuilder targetDiag(SourceLocation Loc, const PartialDiagnostic &PD, FunctionDecl *FD=nullptr)
Definition: Sema.h:12790
clang::OMPThreadPrivateDecl
This represents '#pragma omp threadprivate ...' directive.
Definition: DeclOpenMP.h:110
clang::Sema::ActOnStartCXXMemberReference
ExprResult ActOnStartCXXMemberReference(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, ParsedType &ObjectType, bool &MayBePseudoDestructor)
Definition: SemaExprCXX.cpp:7336
clang::Sema::CodeSegStack
PragmaStack< StringLiteral * > CodeSegStack
Definition: Sema.h:870
clang::Sema::ActOnObjCContainerFinishDefinition
void ActOnObjCContainerFinishDefinition()
Definition: SemaDecl.cpp:16903
clang::Sema::SizelessTypeDiagnoser::SizelessTypeDiagnoser
SizelessTypeDiagnoser(unsigned DiagID, const Ts &... Args)
Definition: Sema.h:2436
clang::TNK_Undeclared_template
@ TNK_Undeclared_template
Lookup for the name failed, but we're assuming it was a template name anyway.
Definition: TemplateKinds.h:50
clang::Sema::ActOnFinishFullStmt
StmtResult ActOnFinishFullStmt(Stmt *Stmt)
Definition: SemaExprCXX.cpp:8699
clang::Sema::mergeSectionAttr
SectionAttr * mergeSectionAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Name)
clang::Sema::SpecialMemberOverloadResult::NoMemberOrDeleted
@ NoMemberOrDeleted
Definition: Sema.h:1549
clang::Sema::AddPushedVisibilityAttribute
void AddPushedVisibilityAttribute(Decl *RD)
AddPushedVisibilityAttribute - If '#pragma GCC visibility' was used, add an appropriate visibility at...
Definition: SemaAttr.cpp:1086
clang::Sema::AnalysisWarnings
sema::AnalysisBasedWarnings AnalysisWarnings
Worker object for performing CFG-based warnings.
Definition: Sema.h:9599
clang::Sema::AtomicPropertySetterGetterRules
void AtomicPropertySetterGetterRules(ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl)
AtomicPropertySetterGetterRules - This routine enforces the rule (via warning) when atomic property h...
Definition: SemaObjCProperty.cpp:2166
clang::Sema::PragmaStack::Slot
Definition: Sema.h:768
clang::Sema::CheckLookupAccess
void CheckLookupAccess(const LookupResult &R)
Checks access to all the declarations in the given result set.
Definition: SemaAccess.cpp:1896
clang::Sema::ActOnOpenMPParallelDirective
StmtResult ActOnOpenMPParallelDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:7398
clang::Sema::CompleteMemberSpecialization
void CompleteMemberSpecialization(NamedDecl *Member, LookupResult &Previous)
Definition: SemaTemplate.cpp:9375
clang::Sema::CheckMSVCRTEntryPoint
void CheckMSVCRTEntryPoint(FunctionDecl *FD)
Definition: SemaDecl.cpp:11526
clang::Sema::ContextualImplicitConverter::Suppress
bool Suppress
Definition: Sema.h:3880
clang::Sema::LookupOverloadedOperatorName
void LookupOverloadedOperatorName(OverloadedOperatorKind Op, Scope *S, UnresolvedSetImpl &Functions)
Definition: SemaLookup.cpp:3112
clang::Sema::AddAllocAlignAttr
void AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ParamExpr)
AddAllocAlignAttr - Adds an alloc_align attribute to a particular declaration.
clang::Sema::DiagnoseClassExtensionDupMethods
void DiagnoseClassExtensionDupMethods(ObjCCategoryDecl *CAT, ObjCInterfaceDecl *ID)
DiagnoseClassExtensionDupMethods - Check for duplicate declaration of a class method in its extension...
Definition: SemaDeclObjC.cpp:1749
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:247
clang::Sema::UseArgumentDependentLookup
bool UseArgumentDependentLookup(const CXXScopeSpec &SS, const LookupResult &R, bool HasTrailingLParen)
Definition: SemaExpr.cpp:3140
clang::Sema::getEnclosingFunction
sema::FunctionScopeInfo * getEnclosingFunction() const
Definition: Sema.cpp:2377
clang::Sema::DiagnoseAutoDeductionFailure
void DiagnoseAutoDeductionFailure(VarDecl *VDecl, Expr *Init)
Definition: SemaTemplateDeduction.cpp:4843
AllowedExplicit
Sema::AllowedExplicit AllowedExplicit
Definition: SemaOverload.cpp:43
clang::Sema::TemporaryMaterializationConversion
ExprResult TemporaryMaterializationConversion(Expr *E)
If E is a prvalue denoting an unmaterialized temporary, materialize it as an xvalue.
Definition: SemaInit.cpp:7951
clang::Sema::Ref_Related
@ Ref_Related
Ref_Related - The two types are reference-related, which means that their unqualified forms (T1 and T...
Definition: Sema.h:12396
clang::Sema::AttachTypeConstraint
bool AttachTypeConstraint(NestedNameSpecifierLoc NS, DeclarationNameInfo NameInfo, ConceptDecl *NamedConcept, const TemplateArgumentListInfo *TemplateArgs, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
Attach a type-constraint to a template parameter.
Definition: SemaTemplate.cpp:1211
clang::Sema::RequireLiteralType
bool RequireLiteralType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
Definition: Sema.h:2655
clang::Sema::PrepareScalarCast
CastKind PrepareScalarCast(ExprResult &src, QualType destType)
Prepares for a scalar cast, performing all the necessary stages except the final cast and returning t...
Definition: SemaExpr.cpp:7455
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::getHashValue
static unsigned getHashValue(const FunctionDeclAndLoc &FDL)
Definition: Sema.h:13875
clang::Sema::VerifyIntegerConstantExpression
ExprResult VerifyIntegerConstantExpression(Expr *E, AllowFoldKind CanFold=NoFold)
Definition: Sema.h:12659
clang::Sema::DiagnoseSelfMove
void DiagnoseSelfMove(const Expr *LHSExpr, const Expr *RHSExpr, SourceLocation OpLoc)
Warn if a value is moved to itself.
Definition: SemaChecking.cpp:16506
clang::Sema::SpecialMemberOverloadResult::SpecialMemberOverloadResult
SpecialMemberOverloadResult(CXXMethodDecl *MD)
Definition: Sema.h:1559
clang::Sema::ActOnStartProtocolInterface
Decl * ActOnStartProtocolInterface(SourceLocation AtProtoInterfaceLoc, IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc, Decl *const *ProtoRefNames, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
Definition: SemaDeclObjC.cpp:1211
clang::Sema::ActOnNameClassifiedAsDependentNonType
ExprResult ActOnNameClassifiedAsDependentNonType(const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, bool IsAddressOfOperand)
Act on the result of classifying a name as an undeclared member of a dependent base class.
Definition: SemaDecl.cpp:1234
clang::Sema::CheckMultiplyDivideOperands
QualType CheckMultiplyDivideOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool IsDivide)
Definition: SemaExpr.cpp:10725
clang::Sema::ComparisonCategoryUsage
ComparisonCategoryUsage
Definition: Sema.h:6072
clang::TNK_Function_template
@ TNK_Function_template
The name refers to a function template or a set of overloaded functions that includes at least one fu...
Definition: TemplateKinds.h:26
clang::Sema::DiagnoseUnterminatedPragmaAttribute
void DiagnoseUnterminatedPragmaAttribute()
Definition: SemaAttr.cpp:1049
clang::Sema::findMacroSpelling
bool findMacroSpelling(SourceLocation &loc, StringRef name)
Looks through the macro-expansion chain for the given location, looking for a macro expansion with th...
Definition: Sema.cpp:2130
clang::Sema::UPPC_Requirement
@ UPPC_Requirement
Definition: Sema.h:8504
clang::Sema::FindUsualDeallocationFunction
FunctionDecl * FindUsualDeallocationFunction(SourceLocation StartLoc, bool CanProvideSize, bool Overaligned, DeclarationName Name)
Definition: SemaExprCXX.cpp:3146
clang::Sema::findInheritingConstructor
CXXConstructorDecl * findInheritingConstructor(SourceLocation Loc, CXXConstructorDecl *BaseCtor, ConstructorUsingShadowDecl *DerivedShadow)
Given a derived-class using shadow declaration for a constructor and the correspnding base class cons...
Definition: SemaDeclCXX.cpp:13522
clang::Sema::shouldSkipAnonEnumBody
SkipBodyInfo shouldSkipAnonEnumBody(Scope *S, IdentifierInfo *II, SourceLocation IILoc)
Determine whether the body of an anonymous enumeration should be skipped.
Definition: SemaDecl.cpp:18239
IdentifierResolver.h
clang::Sema::NonTrivialCUnionContext
NonTrivialCUnionContext
Definition: Sema.h:3088
clang::Sema::ObjCArgInfo::Name
IdentifierInfo * Name
Definition: Sema.h:10164
clang::Sema::FindInstantiatedDecl
NamedDecl * FindInstantiatedDecl(SourceLocation Loc, NamedDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, bool FindingInstantiatedContext=false)
Find the instantiation of the given declaration within the current instantiation.
Definition: SemaTemplateInstantiateDecl.cpp:6394
clang::Sema::PragmaStack::Stack
SmallVector< Slot, 2 > Stack
Definition: Sema.h:841
clang::Sema::AlignPackInfo::AlignPackInfo
AlignPackInfo(AlignPackInfo::Mode M, unsigned Num, bool IsXL)
Definition: Sema.h:672
clang::Sema::isMoreSpecializedThanPrimary
bool isMoreSpecializedThanPrimary(ClassTemplatePartialSpecializationDecl *T, sema::TemplateDeductionInfo &Info)
Definition: SemaTemplateDeduction.cpp:5408
clang::Sema::IsStringLiteralToNonConstPointerConversion
bool IsStringLiteralToNonConstPointerConversion(Expr *From, QualType ToType)
Helper function to determine whether this is the (deprecated) C++ conversion from a string literal to...
Definition: SemaExprCXX.cpp:3995
clang::Sema::IsFloatingPointPromotion
bool IsFloatingPointPromotion(QualType FromType, QualType ToType)
IsFloatingPointPromotion - Determines whether the conversion from FromType to ToType is a floating po...
Definition: SemaOverload.cpp:2240
clang::Sema::DefineInheritingConstructor
void DefineInheritingConstructor(SourceLocation UseLoc, CXXConstructorDecl *Constructor)
Define the specified inheriting constructor.
Definition: SemaDeclCXX.cpp:13612
clang::Sema::FunctionDeclAndLoc::FD
CanonicalDeclPtr< FunctionDecl > FD
Definition: Sema.h:12710
clang::Sema::ExpressionEvaluationContextRecord::isUnevaluated
bool isUnevaluated() const
Definition: Sema.h:1501
clang::Sema::ActOnFinishSEHFinallyBlock
StmtResult ActOnFinishSEHFinallyBlock(SourceLocation Loc, Stmt *Block)
Definition: SemaStmt.cpp:4605
clang::Sema::ActOnMemInitializers
void ActOnMemInitializers(Decl *ConstructorDecl, SourceLocation ColonLoc, ArrayRef< CXXCtorInitializer * > MemInits, bool AnyErrors)
ActOnMemInitializers - Handle the member initializers for a constructor.
Definition: SemaDeclCXX.cpp:5556
clang::Sema::FpPragmaStack
PragmaStack< FPOptionsOverride > FpPragmaStack
Definition: Sema.h:873
clang::Sema::FindCompositeObjCPointerType
QualType FindCompositeObjCPointerType(ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
FindCompositeObjCPointerType - Helper method to find composite type of two objective-c pointer types ...
Definition: SemaExpr.cpp:8751
clang::Sema::ActOnSYCLUniqueStableIdExpr
ExprResult ActOnSYCLUniqueStableIdExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, Expr *E)
Definition: SemaExpr.cpp:3636
clang::Sema::ResolveSingleFunctionTemplateSpecialization
FunctionDecl * ResolveSingleFunctionTemplateSpecialization(OverloadExpr *ovl, bool Complain=false, DeclAccessPair *Found=nullptr)
Given an expression that refers to an overloaded function, try to resolve that overloaded function ex...
Definition: SemaOverload.cpp:12536
clang::Sema::PCC_MemberTemplate
@ PCC_MemberTemplate
Code completion occurs following one or more template headers within a class.
Definition: Sema.h:12974
clang::Sema::InstantiatedNonDependentTypes
llvm::DenseSet< QualType > InstantiatedNonDependentTypes
Non-dependent types used in templates that have already been instantiated by some template instantiat...
Definition: Sema.h:9209
ExpressionTraits.h
clang::Stmt::getSourceRange
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
Definition: Stmt.cpp:324
clang::Sema::GatherArgumentsForCall
bool GatherArgumentsForCall(SourceLocation CallLoc, FunctionDecl *FDecl, const FunctionProtoType *Proto, unsigned FirstParam, ArrayRef< Expr * > Args, SmallVectorImpl< Expr * > &AllArgs, VariadicCallType CallType=VariadicDoesNotApply, bool AllowExplicit=false, bool IsListInitialization=false)
GatherArgumentsForCall - Collector argument expressions for various form of call prototypes.
Definition: SemaExpr.cpp:6136
clang::Sema::ActOnOpenMPNogroupClause
OMPClause * ActOnOpenMPNogroupClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'nogroup' clause.
Definition: SemaOpenMP.cpp:16624
clang::Sema::CXXDefaultConstructor
@ CXXDefaultConstructor
Definition: Sema.h:1670
clang::UnresolvedMemberExpr
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
Definition: ExprCXX.h:3827
clang::Sema::ICEConvertDiagnoser::diagnoseNotInt
virtual SemaDiagnosticBuilder diagnoseNotInt(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic complaining that the expression does not have integral or enumeration type.
clang::Sema::SimplerImplicitMoveMode::Normal
@ Normal
clang::Sema::SetDeclDefaulted
void SetDeclDefaulted(Decl *dcl, SourceLocation DefaultLoc)
Definition: SemaDeclCXX.cpp:17306
clang::Sema::AddIntelFPGABankBitsAttr
void AddIntelFPGABankBitsAttr(Decl *D, const AttributeCommonInfo &CI, Expr **Exprs, unsigned Size)
clang::OMPTraitInfo
Helper data structure representing the traits in a match clause of an declare variant or metadirectiv...
Definition: OpenMPClause.h:8697
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:675
clang::Sema::DiagnoseAbstractType
void DiagnoseAbstractType(const CXXRecordDecl *RD)
Definition: SemaDeclCXX.cpp:5804
clang::NonTypeTemplateParmDecl
NonTypeTemplateParmDecl - Declares a non-type template parameter, e.g., "Size" in.
Definition: DeclTemplate.h:1384
Attr.h
clang::Sema::MergeIntelFPGAForcePow2DepthAttr
IntelFPGAForcePow2DepthAttr * MergeIntelFPGAForcePow2DepthAttr(Decl *D, const IntelFPGAForcePow2DepthAttr &A)
clang::Sema::AlignPackInfo::Packed
@ Packed
Definition: Sema.h:669
clang::Sema::MatchAllMethodDeclarations
void MatchAllMethodDeclarations(const SelectorSet &InsMap, const SelectorSet &ClsMap, SelectorSet &InsMapSeen, SelectorSet &ClsMapSeen, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool &IncompleteImpl, bool ImmediateClass, bool WarnCategoryMethodImpl=false)
MatchAllMethodDeclarations - Check methods declaraed in interface or or protocol against those declar...
Definition: SemaDeclObjC.cpp:2816
clang::Sema::LateTemplateParserCleanup
LateTemplateParserCleanupCB * LateTemplateParserCleanup
Definition: Sema.h:1082
clang::Sema::BuildExprRequirement
concepts::ExprRequirement * BuildExprRequirement(Expr *E, bool IsSatisfied, SourceLocation NoexceptLoc, concepts::ExprRequirement::ReturnTypeRequirement ReturnTypeRequirement)
Definition: SemaExprCXX.cpp:8838
clang::ArrayType::ArraySizeModifier
ArraySizeModifier
Capture whether this is a normal array (e.g.
Definition: Type.h:2904
clang::Sema::checkUnusedDeclAttributes
void checkUnusedDeclAttributes(Declarator &D)
clang::Sema::LookupAnyName
@ LookupAnyName
Look up any declaration with any name.
Definition: Sema.h:4350
clang::Sema::mergeVisibilityAttr
VisibilityAttr * mergeVisibilityAttr(Decl *D, const AttributeCommonInfo &CI, VisibilityAttr::VisibilityType Vis)
clang::Sema::ActOnAsTypeExpr
ExprResult ActOnAsTypeExpr(Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
__builtin_astype(...)
Definition: SemaExpr.cpp:6888
Ownership.h
clang::Sema::ContextualImplicitConverter::noteAmbiguous
virtual SemaDiagnosticBuilder noteAmbiguous(Sema &S, CXXConversionDecl *Conv, QualType ConvTy)=0
Emits a note for one of the candidate conversions.
clang::Sema::AR_accessible
@ AR_accessible
Definition: Sema.h:7715
clang::EST_None
@ EST_None
no exception specification
Definition: ExceptionSpecificationType.h:21
clang::Sema::LOLR_ErrorNoDiagnostic
@ LOLR_ErrorNoDiagnostic
The lookup found no match but no diagnostic was issued.
Definition: Sema.h:4384
clang::NestedNameSpecifier
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Definition: NestedNameSpecifier.h:50
clang::Sema::ActOnReenterFunctionContext
void ActOnReenterFunctionContext(Scope *S, Decl *D)
Push the parameters of D, which must be a function, into scope.
Definition: SemaDecl.cpp:1431
clang::Sema::AddOverriddenMethods
bool AddOverriddenMethods(CXXRecordDecl *DC, CXXMethodDecl *MD)
AddOverriddenMethods - See if a method overrides any in the base classes, and if so,...
Definition: SemaDecl.cpp:8415
clang::Sema::PragmaStack
Definition: Sema.h:767
clang::tooling::Filter
llvm::cl::opt< std::string > Filter
clang::Sema::getMoreSpecializedPartialSpecialization
ClassTemplatePartialSpecializationDecl * getMoreSpecializedPartialSpecialization(ClassTemplatePartialSpecializationDecl *PS1, ClassTemplatePartialSpecializationDecl *PS2, SourceLocation Loc)
Returns the more specialized class template partial specialization according to the rules of partial ...
Definition: SemaTemplateDeduction.cpp:5378
clang::Sema::LookupImplementedMethodInGlobalPool
ObjCMethodDecl * LookupImplementedMethodInGlobalPool(Selector Sel)
LookupImplementedMethodInGlobalPool - Returns the method which has an implementation.
Definition: SemaDeclObjC.cpp:3637
clang::Sema::MergeSYCLIntelFPGAMaxConcurrencyAttr
SYCLIntelFPGAMaxConcurrencyAttr * MergeSYCLIntelFPGAMaxConcurrencyAttr(Decl *D, const SYCLIntelFPGAMaxConcurrencyAttr &A)
clang::Sema::ActOnOpenMPTargetSimdDirective
StmtResult ActOnOpenMPTargetSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13461
clang::Sema::ActOnCXXEnterDeclInitializer
void ActOnCXXEnterDeclInitializer(Scope *S, Decl *Dcl)
ActOnCXXEnterDeclInitializer - Invoked when we are about to parse an initializer for the declaration ...
Definition: SemaDeclCXX.cpp:17614
clang::Sema::BuildStmtExpr
ExprResult BuildStmtExpr(SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc, unsigned TemplateDepth)
Definition: SemaExpr.cpp:15588
clang::Sema::hasVisibleDeclarationSlow
bool hasVisibleDeclarationSlow(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules)
Definition: SemaLookup.cpp:1928
clang::Sema::CheckAlignasUnderalignment
void CheckAlignasUnderalignment(Decl *D)
clang::Sema::getNormalizedAssociatedConstraints
const NormalizedConstraint * getNormalizedAssociatedConstraints(NamedDecl *ConstrainedDecl, ArrayRef< const Expr * > AssociatedConstraints)
Definition: SemaConcept.cpp:710
clang::UnresolvedSetIterator
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:32
clang::concepts::Requirement::SubstitutionDiagnostic
Definition: ExprConcepts.h:161
clang::Sema::mergeDLLExportAttr
DLLExportAttr * mergeDLLExportAttr(Decl *D, const AttributeCommonInfo &CI)
clang::Sema::ActOnOpenMPDeclareVariantDirective
void ActOnOpenMPDeclareVariantDirective(FunctionDecl *FD, Expr *VariantRef, OMPTraitInfo &TI, ArrayRef< Expr * > AdjustArgsNothing, ArrayRef< Expr * > AdjustArgsNeedDevicePtr, ArrayRef< OMPDeclareVariantAttr::InteropType > AppendArgs, SourceLocation AdjustArgsLoc, SourceLocation AppendArgsLoc, SourceRange SR)
Called on well-formed '#pragma omp declare variant' after parsing of the associated method/function.
Definition: SemaOpenMP.cpp:7327
clang::Sema::ActOnBuiltinBitCastExpr
ExprResult ActOnBuiltinBitCastExpr(SourceLocation KWLoc, Declarator &Dcl, ExprResult Operand, SourceLocation RParenLoc)
Definition: SemaCast.cpp:383
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2839
clang::Sema::StdBadAlloc
LazyDeclPtr StdBadAlloc
The C++ "std::bad_alloc" class, which is defined by the C++ standard library.
Definition: Sema.h:1296
clang::Sema::CheckDependentFunctionTemplateSpecialization
bool CheckDependentFunctionTemplateSpecialization(FunctionDecl *FD, const TemplateArgumentListInfo &ExplicitTemplateArgs, LookupResult &Previous)
Perform semantic analysis for the given dependent function template specialization.
Definition: SemaTemplate.cpp:8898
clang::Sema::CheckObjCConversion
ARCConversionResult CheckObjCConversion(SourceRange castRange, QualType castType, Expr *&op, CheckedConversionKind CCK, bool Diagnose=true, bool DiagnoseCFAudited=false, BinaryOperatorKind Opc=BO_PtrMemD)
Checks for invalid conversions and casts between retainable pointers and other pointer kinds for ARC ...
Definition: SemaExprObjC.cpp:4394
clang::Sema::BuildBinOp
ExprResult BuildBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
Definition: SemaExpr.cpp:15094
clang::TypeTrait
TypeTrait
Names for traits that operate specifically on types.
Definition: TypeTraits.h:21
clang::Sema::PCC_ObjCImplementation
@ PCC_ObjCImplementation
Code completion occurs within an Objective-C implementation or category implementation.
Definition: Sema.h:12965
clang::Sema::actOnLambdaInitCaptureInitialization
ParsedType actOnLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, IdentifierInfo *Id, LambdaCaptureInitKind InitKind, Expr *&Init)
Perform initialization analysis of the init-capture and perform any implicit conversions such as an l...
Definition: Sema.h:7081
clang::Sema::SetSYCLKernelNames
void SetSYCLKernelNames()
Definition: SemaSYCL.cpp:3614
clang::Sema::FilterLookupForScope
void FilterLookupForScope(LookupResult &R, DeclContext *Ctx, Scope *S, bool ConsiderLinkage, bool AllowInlineNamespace)
Filters out lookup results that don't fall within the given scope as determined by isDeclInScope.
Definition: SemaDecl.cpp:1578
clang::Sema::AA_Assigning
@ AA_Assigning
Definition: Sema.h:3747
clang::RequiresExpr
C++2a [expr.prim.req]: A requires-expression provides a concise way to express requirements on templa...
Definition: ExprConcepts.h:475
clang::DiagnosticsEngine
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:192
clang::Sema::CheckOMPRequiresDecl
OMPRequiresDecl * CheckOMPRequiresDecl(SourceLocation Loc, ArrayRef< OMPClause * > Clauses)
Check restrictions on Requires directive.
Definition: SemaOpenMP.cpp:3302
clang::Sema::LookupOperatorName
@ LookupOperatorName
Look up of an operator name (e.g., operator+) for use with operator overloading.
Definition: Sema.h:4317
clang::EST_Dynamic
@ EST_Dynamic
throw(T1, T2)
Definition: ExceptionSpecificationType.h:23
clang::Sema::ActOnNamespaceAliasDef
Decl * ActOnNamespaceAliasDef(Scope *CurScope, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, CXXScopeSpec &SS, SourceLocation IdentLoc, IdentifierInfo *Ident)
Definition: SemaDeclCXX.cpp:13104
clang::LookupResult
Represents the results of name lookup.
Definition: Lookup.h:46
clang::Sema::FST_Strftime
@ FST_Strftime
Definition: Sema.h:13325
clang::Sema::ActOnObjCAtSynchronizedStmt
StmtResult ActOnObjCAtSynchronizedStmt(SourceLocation AtLoc, Expr *SynchExpr, Stmt *SynchBody)
Definition: SemaStmt.cpp:4314
clang::Qualifiers
The collection of all-type qualifiers we support.
Definition: Type.h:147
clang::Sema::BuildMemberReferenceExpr
ExprResult BuildMemberReferenceExpr(Expr *Base, QualType BaseType, SourceLocation OpLoc, bool IsArrow, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, ActOnMemberAccessExtraArgs *ExtraArgs=nullptr)
Definition: SemaExprMember.cpp:743
clang::Sema::ActOnTypeParameter
NamedDecl * ActOnTypeParameter(Scope *S, bool Typename, SourceLocation EllipsisLoc, SourceLocation KeyLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedType DefaultArg, bool HasTypeConstraint)
ActOnTypeParameter - Called when a C++ template type parameter (e.g., "typename T") has been parsed.
Definition: SemaTemplate.cpp:1028
clang::Sema::CheckDestructor
bool CheckDestructor(CXXDestructorDecl *Destructor)
CheckDestructor - Checks a fully-formed destructor definition for well-formedness,...
Definition: SemaDeclCXX.cpp:10551
TypoCorrection.h
clang::Sema::AddMemberOperatorCandidates
void AddMemberOperatorCandidates(OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, OverloadCandidateParamOrder PO={})
Add overload candidates for overloaded operators that are member functions.
Definition: SemaOverload.cpp:7737
clang::Sema::DeclareImplicitDefaultConstructor
CXXConstructorDecl * DeclareImplicitDefaultConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit default constructor for the given class.
Definition: SemaDeclCXX.cpp:13408
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1664
clang::OpenMPReductionClauseModifier
OpenMPReductionClauseModifier
OpenMP modifiers for 'reduction' clause.
Definition: OpenMPKinds.h:164
clang::Sema::Diag
SemaDiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID, bool DeferHint=false)
Emit a diagnostic.
Definition: Sema.cpp:1960
clang::Sema::SpecialMemberOverloadResult::Kind
Kind
Definition: Sema.h:1548
clang::Sema::GetTypeForDeclarator
TypeSourceInfo * GetTypeForDeclarator(Declarator &D, Scope *S)
GetTypeForDeclarator - Convert the type for the specified declarator to Type instances.
Definition: SemaType.cpp:5812
clang::Sema::DeviceDeferredDiagnostic::DeviceDeferredDiagnostic
DeviceDeferredDiagnostic(SourceLocation SL, const PartialDiagnostic &PD, DeviceDiagnosticReason R)
Definition: Sema.h:12688
clang::Sema::getPrintable
static QualType getPrintable(QualType T)
Definition: Sema.h:2387
clang::Sema::TUScope
Scope * TUScope
Translation Unit Scope - useful to Objective-C actions that need to lookup file scope declarations in...
Definition: Sema.h:1289
clang::Sema::KernelCallVariadicFunction
@ KernelCallVariadicFunction
Definition: Sema.h:13690
clang::Sema::getFullyPackExpandedSize
Optional< unsigned > getFullyPackExpandedSize(TemplateArgument Arg)
Given a template argument that contains an unexpanded parameter pack, but which has already been subs...
Definition: SemaTemplateVariadic.cpp:1114
clang::Sema::CUDACheckLambdaCapture
void CUDACheckLambdaCapture(CXXMethodDecl *D, const sema::Capture &Capture)
Definition: SemaCUDA.cpp:852
clang::Sema::CreateMaterializeTemporaryExpr
MaterializeTemporaryExpr * CreateMaterializeTemporaryExpr(QualType T, Expr *Temporary, bool BoundToLvalueReference)
Definition: SemaInit.cpp:7936
clang::Sema::NamedReturnInfo::S
Status S
Definition: Sema.h:5155
clang::Sema::getOptimizeOffPragmaLocation
SourceLocation getOptimizeOffPragmaLocation() const
Get the location for the currently active "\#pragma clang optimize off". If this location is invalid,...
Definition: Sema.h:10557
clang::Sema::ContextRAII::pop
void pop()
Definition: Sema.h:1182
clang::Sema::recreateSyntacticForm
Expr * recreateSyntacticForm(PseudoObjectExpr *E)
Given a pseudo-object expression, recreate what it looks like syntactically without the attendant Opa...
Definition: SemaPseudoObject.cpp:1638
clang::Sema::BuildMSDependentExistsStmt
StmtResult BuildMSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists, NestedNameSpecifierLoc QualifierLoc, DeclarationNameInfo NameInfo, Stmt *Nested)
Definition: SemaStmt.cpp:4623
clang::Sema::PCSK_Text
@ PCSK_Text
Definition: Sema.h:633
clang::PreferredTypeBuilder::enterSubscript
void enterSubscript(Sema &S, SourceLocation Tok, Expr *LHS)
Definition: SemaCodeComplete.cpp:585
clang::SYCLIntegrationHeader::emit
void emit(raw_ostream &Out)
Emits contents of the header into given stream.
Definition: SemaSYCL.cpp:4584
clang::Sema::GlobalMethodPool::empty
bool empty() const
Definition: Sema.h:1645
clang::Sema::hasMergedDefinitionInCurrentModule
bool hasMergedDefinitionInCurrentModule(NamedDecl *Def)
Definition: SemaLookup.cpp:1630
clang::Sema::ActOnCXXNew
ExprResult ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, Declarator &D, Expr *Initializer)
ActOnCXXNew - Parsed a C++ 'new' expression.
Definition: SemaExprCXX.cpp:1833
clang::Sema::VerifyIntegerConstantExpression
ExprResult VerifyIntegerConstantExpression(Expr *E, llvm::APSInt *Result, VerifyICEDiagnoser &Diagnoser, AllowFoldKind CanFold=NoFold)
VerifyIntegerConstantExpression - Verifies that an expression is an ICE, and reports the appropriate ...
Definition: SemaExpr.cpp:16814
clang::Sema::ActOnMemberAccessExpr
ExprResult ActOnMemberAccessExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Member, Decl *ObjCImpDecl)
The main callback when the parser finds something like expression .
Definition: SemaExprMember.cpp:1697
clang::Sema::DeviceDiagnosticReason::None
@ None
Diagnostic doesn't apply to anything.
Module.h
clang::Sema::BuildCallToObjectOfClassType
ExprResult BuildCallToObjectOfClassType(Scope *S, Expr *Object, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc)
BuildCallToObjectOfClassType - Build a call to an object of class type (C++ [over....
Definition: SemaOverload.cpp:14611
clang::Sema::CheckCompareOperands
QualType CheckCompareOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
Definition: SemaExpr.cpp:12196
clang::Sema::ActOnOpenMPIfClause
OMPClause * ActOnOpenMPIfClause(OpenMPDirectiveKind NameModifier, Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation NameModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'if' clause.
Definition: SemaOpenMP.cpp:15517
clang::Sema::getTypeName
ParsedType getTypeName(const IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec *SS=nullptr, bool isClassName=false, bool HasTrailingDot=false, ParsedType ObjectType=nullptr, bool IsCtorOrDtorName=false, bool WantNontrivialTypeSourceInfo=false, bool IsClassTemplateDeductionContext=true, IdentifierInfo **CorrectedII=nullptr)
If the identifier refers to a type name within this scope, return the declaration of that type.
Definition: SemaDecl.cpp:285
clang::Sema::FunctionDeclAndLoc::Loc
SourceLocation Loc
Definition: Sema.h:12711
clang::Sema::BuildAtomicType
QualType BuildAtomicType(QualType T, SourceLocation Loc)
Definition: SemaType.cpp:9206
clang::Sema::CodeSynthesisContexts
SmallVector< CodeSynthesisContext, 16 > CodeSynthesisContexts
List of active code synthesis contexts.
Definition: Sema.h:9202
clang::Sema::Ovl_NonFunction
@ Ovl_NonFunction
This is not an overload because the lookup results contain a non-function.
Definition: Sema.h:3769
clang::FileNullability::PointerLoc
SourceLocation PointerLoc
The first pointer declarator (of any pointer kind) in the file that does not have a corresponding nul...
Definition: Sema.h:249
clang::Sema::checkClassLevelCodeSegAttribute
void checkClassLevelCodeSegAttribute(CXXRecordDecl *Class)
Definition: SemaDeclCXX.cpp:6286
clang::Sema::KernelCallDllimportFunction
@ KernelCallDllimportFunction
Definition: Sema.h:13689
clang::Sema::TUK_Definition
@ TUK_Definition
Definition: Sema.h:3379
clang::Sema::CVT_Unified
@ CVT_Unified
Emitted on both sides with different addresses.
Definition: Sema.h:12821
clang::Sema::DiagnoseSizeOfParametersAndReturnValue
void DiagnoseSizeOfParametersAndReturnValue(ArrayRef< ParmVarDecl * > Parameters, QualType ReturnTy, NamedDecl *D)
Diagnose whether the size of parameters or return value of a function or obj-c method definition is p...
Definition: SemaDecl.cpp:14087
clang::PreferredTypeBuilder
Tracks expected type during expression parsing, for use in code completion.
Definition: Sema.h:472
clang::Sema::ActOnCXXForRangeIdentifier
StmtResult ActOnCXXForRangeIdentifier(Scope *S, SourceLocation IdentLoc, IdentifierInfo *Ident, ParsedAttributes &Attrs)
Definition: SemaDecl.cpp:13224
clang::Sema::DefaultedComparisonKind::Relational
@ Relational
This is an <, <=, >, or >= that should be implemented as a rewrite in terms of a <=> comparison.
clang::Sema::ActOnAttributedStmt
StmtResult ActOnAttributedStmt(const ParsedAttributes &AttrList, Stmt *SubStmt)
Definition: SemaStmt.cpp:590
clang::UsingShadowDecl
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition: DeclCXX.h:3207
clang::Sema::BuildEmptyCXXFoldExpr
ExprResult BuildEmptyCXXFoldExpr(SourceLocation EllipsisLoc, BinaryOperatorKind Operator)
Definition: SemaTemplateVariadic.cpp:1261
clang::Sema::DiscardCleanupsInEvaluationContext
void DiscardCleanupsInEvaluationContext()
Definition: SemaExpr.cpp:17368
clang::Parser
Parser - This implements a parser for the C family of languages.
Definition: Parser.h:60
clang::Sema::UPPC_IfExists
@ UPPC_IfExists
Microsoft __if_exists.
Definition: Sema.h:8489
clang::Sema::ContextualImplicitConverter::ContextualImplicitConverter
ContextualImplicitConverter(bool Suppress=false, bool SuppressConversion=false)
Definition: Sema.h:3883
clang::Sema::SemaDiagnosticBuilder::operator<<
const SemaDiagnosticBuilder & operator<<(T &&V) const
Definition: Sema.h:1995
clang::Sema::ActOnOpenMPForDirective
StmtResult ActOnOpenMPForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:9983
clang::Sema::VerifyBitField
ExprResult VerifyBitField(SourceLocation FieldLoc, IdentifierInfo *FieldName, QualType FieldTy, bool IsMsStruct, Expr *BitWidth, bool *ZeroWidth=nullptr)
VerifyBitField - verifies that a bit field expression is an ICE and has the correct width,...
Definition: SemaDecl.cpp:16938
clang::Sema::mergeEnforceTCBLeafAttr
EnforceTCBLeafAttr * mergeEnforceTCBLeafAttr(Decl *D, const EnforceTCBLeafAttr &AL)
clang::Sema::getCopyElisionCandidate
const VarDecl * getCopyElisionCandidate(NamedReturnInfo &Info, QualType ReturnType)
Updates given NamedReturnInfo's move-eligible and copy-elidable statuses, considering the function re...
Definition: SemaStmt.cpp:3448
clang::ExprObjectKind
ExprObjectKind
A further classification of the kind of object referenced by an l-value or x-value.
Definition: Specifiers.h:134
clang::Sema::isObjCMethodDecl
bool isObjCMethodDecl(Decl *D)
Definition: Sema.h:3164
clang::Sema::ActOnOpenMPDeclareMapperVarDecl
TypeResult ActOnOpenMPDeclareMapperVarDecl(Scope *S, Declarator &D)
Check variable declaration in 'omp declare mapper' construct.
Definition: SemaOpenMP.cpp:21430
clang::Sema::ActOnOpenMPGenericLoopDirective
StmtResult ActOnOpenMPGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10193
clang::Sema::CreateBuiltinBinOp
ExprResult CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr)
CreateBuiltinBinOp - Creates a new built-in binary operation with operator Opc at location TokLoc.
Definition: SemaExpr.cpp:14559
clang::Sema::getSourceManager
SourceManager & getSourceManager() const
Definition: Sema.h:1779
clang::Sema::LateParsedInstantiations
SmallVector< PendingImplicitInstantiation, 1 > LateParsedInstantiations
Queue of implicit template instantiations that cannot be performed eagerly.
Definition: Sema.h:9618
clang::Sema::CheckVectorCast
bool CheckVectorCast(SourceRange R, QualType VectorTy, QualType Ty, CastKind &Kind)
Definition: SemaExpr.cpp:7807
clang::Sema::CCEK_Enumerator
@ CCEK_Enumerator
Enumerator value with fixed underlying type.
Definition: Sema.h:3864
clang::Sema::LocalEagerInstantiationScope::LocalEagerInstantiationScope
LocalEagerInstantiationScope(Sema &S)
Definition: Sema.h:9677
clang::Sema::DefaultedFunctionKind::DefaultedFunctionKind
DefaultedFunctionKind(DefaultedComparisonKind Comp)
Definition: Sema.h:3460
clang::Sema::NameClassification::UndeclaredTemplate
static NameClassification UndeclaredTemplate(TemplateName Name)
Definition: Sema.h:2830
clang::Sema::getAsTemplateNameDecl
static NamedDecl * getAsTemplateNameDecl(NamedDecl *D, bool AllowFunctionTemplates=true, bool AllowDependent=true)
Try to interpret the lookup result D as a template-name.
Definition: SemaTemplate.cpp:97
clang::Sema::AttributeCompletion::Scope
@ Scope
clang::Sema::ActOnOpenMPCopyprivateClause
OMPClause * ActOnOpenMPCopyprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyprivate' clause.
Definition: SemaOpenMP.cpp:19459
clang::Sema::FunctionParamTypesAreEqual
bool FunctionParamTypesAreEqual(const FunctionProtoType *OldType, const FunctionProtoType *NewType, unsigned *ArgPos=nullptr)
FunctionParamTypesAreEqual - This routine checks two function proto types for equality of their argum...
Definition: SemaOverload.cpp:2975
clang::Sema::CheckTemplateArgument
bool CheckTemplateArgument(NamedDecl *Param, TemplateArgumentLoc &Arg, NamedDecl *Template, SourceLocation TemplateLoc, SourceLocation RAngleLoc, unsigned ArgumentPackIndex, SmallVectorImpl< TemplateArgument > &Converted, CheckTemplateArgumentKind CTAK=CTAK_Specified)
Check that the given template argument corresponds to the given template parameter.
Definition: SemaTemplate.cpp:5369
clang::Sema::CheckTemplateIdType
QualType CheckTemplateIdType(TemplateName Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs)
Definition: SemaTemplate.cpp:3651
clang::Sema::SpecialMemberOverloadResult::Success
@ Success
Definition: Sema.h:1551
clang::Sema::AR_dependent
@ AR_dependent
Definition: Sema.h:7717
clang::Sema::ExpressionEvaluationContext::DiscardedStatement
@ DiscardedStatement
The current expression occurs within a discarded statement.
clang::Sema::ActOnPragmaAttributePop
void ActOnPragmaAttributePop(SourceLocation PragmaLoc, const IdentifierInfo *Namespace)
Called on well-formed '#pragma clang attribute pop'.
Definition: SemaAttr.cpp:978
clang::Sema::BFRK_Rebuild
@ BFRK_Rebuild
Instantiation or recovery rebuild of a for-range statement.
Definition: Sema.h:5105
clang::Sema::TDK_NonDependentConversionFailure
@ TDK_NonDependentConversionFailure
Checking non-dependent argument conversions failed.
Definition: Sema.h:8852
clang::Sema::ProcessPragmaWeak
void ProcessPragmaWeak(Scope *S, Decl *D)
clang::Sema::LookupQualifiedName
bool LookupQualifiedName(LookupResult &R, DeclContext *LookupCtx, bool InUnqualifiedLookup=false)
Perform qualified name lookup into a given context.
Definition: SemaLookup.cpp:2223
clang::Sema::ActOnCastExpr
ExprResult ActOnCastExpr(Scope *S, SourceLocation LParenLoc, Declarator &D, ParsedType &Ty, SourceLocation RParenLoc, Expr *CastExpr)
Definition: SemaExpr.cpp:7895
clang::Sema::CodeCompleteInPreprocessorConditionalExclusion
void CodeCompleteInPreprocessorConditionalExclusion(Scope *S)
Definition: SemaCodeComplete.cpp:9779
clang::Sema::ActOnMemberAccessExtraArgs::S
Scope * S
Definition: Sema.h:5738
clang::SYCLIntegrationHeader::kernel_param_kind_t
kernel_param_kind_t
Definition: Sema.h:314
clang::Sema::FunctionEmissionStatus::Unknown
@ Unknown
clang::CapturedRegionKind
CapturedRegionKind
The different kinds of captured statement.
Definition: CapturedStmt.h:16
clang::Sema::MergeTypedefNameDecl
void MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, LookupResult &OldDecls)
MergeTypedefNameDecl - We just parsed a typedef 'New' which has the same name and scope as a previous...
Definition: SemaDecl.cpp:2378
clang::Sema::tryToFixVariablyModifiedVarType
bool tryToFixVariablyModifiedVarType(TypeSourceInfo *&TInfo, QualType &T, SourceLocation Loc, unsigned FailedFoldDiagID)
Attempt to fold a variable-sized type to a constant-sized type, returning true if we were successful.
Definition: SemaDecl.cpp:6288
clang::Sema::ActOnOpenMPWhenClause
OMPClause * ActOnOpenMPWhenClause(OMPTraitInfo &TI, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'when' clause.
clang::Sema::PCC_ObjCInstanceVariableList
@ PCC_ObjCInstanceVariableList
Code completion occurs within the list of instance variables in an Objective-C interface,...
Definition: Sema.h:12968
clang::Sema::PragmaStack::PragmaStack
PragmaStack(const ValueType &Default)
Definition: Sema.h:836
clang::OpenMPMapClauseKind
OpenMPMapClauseKind
OpenMP mapping kind for 'map' clause.
Definition: OpenMPKinds.h:70
clang::Sema::CheckAddressOfMemberAccess
AccessResult CheckAddressOfMemberAccess(Expr *OvlExpr, DeclAccessPair FoundDecl)
Definition: SemaAccess.cpp:1837
clang::Sema::ActOnOpenMPDefaultmapClause
OMPClause * ActOnOpenMPDefaultmapClause(OpenMPDefaultmapClauseModifier M, OpenMPDefaultmapClauseKind Kind, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation MLoc, SourceLocation KindLoc, SourceLocation EndLoc)
Called on well-formed 'defaultmap' clause.
Definition: SemaOpenMP.cpp:21829
clang::Sema::ActOnOpenMPDestroyClause
OMPClause * ActOnOpenMPDestroyClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'destroy' clause.
Definition: SemaOpenMP.cpp:16819
clang::Sema::CodeCompleteObjCProtocolDecl
void CodeCompleteObjCProtocolDecl(Scope *S)
Definition: SemaCodeComplete.cpp:8308
clang::InitListExpr
Describes an C or C++ initializer list.
Definition: Expr.h:4844
clang::Sema::PSK_Push_Set
@ PSK_Push_Set
Definition: Sema.h:660
clang::Sema::CheckVectorConditionalTypes
QualType CheckVectorConditionalTypes(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, SourceLocation QuestionLoc)
Definition: SemaExprCXX.cpp:6106
clang::Sema::RequiredTemplateKind::RequiredTemplateKind
RequiredTemplateKind(SourceLocation TemplateKWLoc=SourceLocation())
Template name is required if TemplateKWLoc is valid.
Definition: Sema.h:7856
clang::Sema::AttributeCompletion::None
@ None
clang::Sema::SpecialMemberOverloadResult::setKind
void setKind(Kind K)
Definition: Sema.h:1566
clang::Sema::DefaultSynthesizeProperties
void DefaultSynthesizeProperties(Scope *S, ObjCImplDecl *IMPDecl, ObjCInterfaceDecl *IDecl, SourceLocation AtEnd)
DefaultSynthesizeProperties - This routine default synthesizes all properties which must be synthesiz...
Definition: SemaObjCProperty.cpp:1888
clang::Sema::BuildPredefinedExpr
ExprResult BuildPredefinedExpr(SourceLocation Loc, PredefinedExpr::IdentKind IK)
Definition: SemaExpr.cpp:3530
clang::NamedDecl::isExternallyDeclarable
bool isExternallyDeclarable() const
Determine whether this declaration can be redeclared in a different translation unit.
Definition: Decl.h:412
clang::Sema::CachedFunctionScope
std::unique_ptr< sema::FunctionScopeInfo > CachedFunctionScope
Definition: Sema.h:957
clang::Sema::TPC_FriendFunctionTemplate
@ TPC_FriendFunctionTemplate
Definition: Sema.h:8003
clang::Sema::AddTemplateOverloadCandidate
void AddTemplateOverloadCandidate(FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, TemplateArgumentListInfo *ExplicitTemplateArgs, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=true, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, OverloadCandidateParamOrder PO={})
Add a C++ function template specialization as a candidate in the candidate set, using template argume...
Definition: SemaOverload.cpp:7143
clang::Sema::AddFunctionCandidates
void AddFunctionCandidates(const UnresolvedSetImpl &Functions, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, bool SuppressUserConversions=false, bool PartialOverloading=false, bool FirstArgumentIsBase=false)
Add all of the function declarations in the given function set to the overload candidate set.
Definition: SemaOverload.cpp:6812
clang::Sema::setFunctionHasMustTail
void setFunctionHasMustTail()
Definition: Sema.cpp:2357
clang::Sema::getEmissionReason
DeviceDiagnosticReason getEmissionReason(const FunctionDecl *Decl)
Definition: SemaDecl.cpp:18818
clang::Sema::createLambdaClosureType
CXXRecordDecl * createLambdaClosureType(SourceRange IntroducerRange, TypeSourceInfo *Info, unsigned LambdaDependencyKind, LambdaCaptureDefault CaptureDefault)
Create a new lambda closure type.
Definition: SemaLambda.cpp:242
llvm::Optional
Definition: LLVM.h:40
clang::Sema::AbstractFieldType
@ AbstractFieldType
Definition: Sema.h:7804
clang::Sema::setRoundingMode
void setRoundingMode(SourceLocation Loc, llvm::RoundingMode)
Called to set constant rounding mode for floating point operations.
Definition: SemaAttr.cpp:1162
clang::Sema::BoundTypeDiagnoser::BoundTypeDiagnoser
BoundTypeDiagnoser(unsigned DiagID, const Ts &...Args)
Definition: Sema.h:2407
clang::Sema::CodeCompletePreprocessorExpression
void CodeCompletePreprocessorExpression()
Definition: SemaCodeComplete.cpp:9811
clang::Sema::UPPC_Lambda
@ UPPC_Lambda
Lambda expression.
Definition: Sema.h:8495
clang::Sema::BuildCXXConstructExpr
ExprResult BuildCXXConstructExpr(SourceLocation ConstructLoc, QualType DeclInitType, NamedDecl *FoundDecl, CXXConstructorDecl *Constructor, MultiExprArg Exprs, bool HadMultipleCandidates, bool IsListInitialization, bool IsStdInitListInitialization, bool RequiresZeroInit, unsigned ConstructKind, SourceRange ParenRange)
BuildCXXConstructExpr - Creates a complete call to a constructor, including handling of its default a...
Definition: SemaDeclCXX.cpp:15445
clang::Sema::CompleteTypeKind::AcceptSizeless
@ AcceptSizeless
Relax the normal rules for complete types so that they include sizeless built-in types.
clang::Sema::ActOnStartCXXMemberDeclarations
void ActOnStartCXXMemberDeclarations(Scope *S, Decl *TagDecl, SourceLocation FinalLoc, bool IsFinalSpelledSealed, bool IsAbstract, SourceLocation LBraceLoc)
ActOnStartCXXMemberDeclarations - Invoked when we have parsed a C++ record definition's base-specifie...
Definition: SemaDecl.cpp:16803
clang::Sema::buildCoroutineParameterMoves
bool buildCoroutineParameterMoves(SourceLocation Loc)
Definition: SemaCoroutine.cpp:1629
clang::Sema::NTCUC_FunctionParam
@ NTCUC_FunctionParam
Definition: Sema.h:3090
clang::Sema::ActOnCXXDelete
ExprResult ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, bool ArrayForm, Expr *Operand)
ActOnCXXDelete - Parsed a C++ 'delete' expression.
Definition: SemaExprCXX.cpp:3515
clang::Sema::CheckMatrixMultiplyOperands
QualType CheckMatrixMultiplyOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
Definition: SemaExpr.cpp:12959
clang::Sema::getPrintable
static StringRef getPrintable(StringRef S)
Definition: Sema.h:2381
clang::Sema::PrintInstantiationStack
void PrintInstantiationStack()
Prints the current instantiation stack through a series of notes.
Definition: SemaTemplateInstantiate.cpp:506
clang::Sema::AlignPackIncludeState::HasNonDefaultValue
bool HasNonDefaultValue
Definition: Sema.h:863
clang::Sema::BuildBasePathArray
void BuildBasePathArray(const CXXBasePaths &Paths, CXXCastPath &BasePath)
Definition: SemaDeclCXX.cpp:2900
clang::Sema::SubstAutoTypeSourceInfo
TypeSourceInfo * SubstAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto, QualType Replacement)
Substitute Replacement for auto in TypeWithAuto.
Definition: SemaTemplateDeduction.cpp:4811
clang::Sema::CheckLiteralKind
ObjCLiteralKind CheckLiteralKind(Expr *FromE)
Definition: SemaExpr.cpp:11705
clang::Sema::UsualArithmeticConversions
QualType UsualArithmeticConversions(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, ArithConvKind ACK)
UsualArithmeticConversions - Performs various conversions that are common to binary operators (C99 6....
Definition: SemaExpr.cpp:1566
clang::Sema::notePreviousDefinition
void notePreviousDefinition(const NamedDecl *Old, SourceLocation New)
Definition: SemaDecl.cpp:4484
clang::ObjCMethodList
a linked list of methods with the same selector name but different signatures.
Definition: ObjCMethodList.h:25
clang::Sema::ActOnFields
void ActOnFields(Scope *S, SourceLocation RecLoc, Decl *TagDecl, ArrayRef< Decl * > Fields, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &AttrList)
Definition: SemaDecl.cpp:17564
llvm::SmallPtrSet
Definition: ASTContext.h:82
clang::Sema::NonTagKind
NonTagKind
Common ways to introduce type names without a tag for use in diagnostics.
Definition: Sema.h:3355
clang::Sema::isEmptyCudaDestructor
bool isEmptyCudaDestructor(SourceLocation Loc, CXXDestructorDecl *CD)
Definition: SemaCUDA.cpp:502
clang::Sema::ActOnOpenMPScanDirective
StmtResult ActOnOpenMPScanDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp scan'.
Definition: SemaOpenMP.cpp:10828
clang::Sema::ConditionResult::isInvalid
bool isInvalid() const
Definition: Sema.h:12548
clang::Sema::AddBuiltinCandidate
void AddBuiltinCandidate(QualType *ParamTys, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool IsAssignmentOperator=false, unsigned NumContextualBoolArguments=0)
AddBuiltinCandidate - Add a candidate for a built-in operator.
Definition: SemaOverload.cpp:7788
clang::MacroInfo
Encapsulates the data about a macro definition (e.g.
Definition: MacroInfo.h:39
clang::Sema::ActOnVarTemplateSpecialization
DeclResult ActOnVarTemplateSpecialization(Scope *S, Declarator &D, TypeSourceInfo *DI, SourceLocation TemplateKWLoc, TemplateParameterList *TemplateParams, StorageClass SC, bool IsPartialSpecialization)
Definition: SemaTemplate.cpp:4291
clang::Sema::ReferenceConversionsScope::DerivedToBase
@ DerivedToBase
Definition: Sema.h:12410
clang::Sema::SkippedDefinitionContext
void * SkippedDefinitionContext
Definition: Sema.h:3516
clang::DiagnosticsEngine::setLastDiagnosticIgnored
void setLastDiagnosticIgnored(bool Ignored)
Pretend that the last diagnostic issued was ignored, so any subsequent notes will be suppressed,...
Definition: Diagnostic.h:760
clang::Sema::ActOnPrivateModuleFragmentDecl
DeclGroupPtrTy ActOnPrivateModuleFragmentDecl(SourceLocation ModuleLoc, SourceLocation PrivateLoc)
The parser has processed a private-module-fragment declaration that begins the definition of the priv...
Definition: SemaModule.cpp:335
clang::Sema::ActOnReenterCXXMethodParameter
void ActOnReenterCXXMethodParameter(Scope *S, ParmVarDecl *Param)
This is used to implement the constant expression evaluation part of the attribute enable_if extensio...
Definition: SemaDeclCXX.cpp:10364
clang::Sema::CompoundScopeRAII::~CompoundScopeRAII
~CompoundScopeRAII()
Definition: Sema.h:5020
clang::Sema::DeduceFunctionTypeFromReturnExpr
bool DeduceFunctionTypeFromReturnExpr(FunctionDecl *FD, SourceLocation ReturnLoc, Expr *&RetExpr, const AutoType *AT)
Deduce the return type for a function from a returned expression, per C++1y [dcl.spec....
Definition: SemaStmt.cpp:3762
clang::Sema::BoundTypeDiagnoser::diagnose
void diagnose(Sema &S, SourceLocation Loc, QualType T) override
Definition: Sema.h:2412
clang::Sema::DiagnoseOwningPropertyGetterSynthesis
void DiagnoseOwningPropertyGetterSynthesis(const ObjCImplementationDecl *D)
Definition: SemaObjCProperty.cpp:2260
clang::Sema::ActOnOpenMPTaskgroupDirective
StmtResult ActOnOpenMPTaskgroupDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskgroup'.
Definition: SemaOpenMP.cpp:10751
clang::Sema::isLaxVectorConversion
bool isLaxVectorConversion(QualType srcType, QualType destType)
Is this a legal conversion between two types, one of which is known to be a vector type?
Definition: SemaExpr.cpp:7758
clang::Sema::ActOnOpenMPAcqRelClause
OMPClause * ActOnOpenMPAcqRelClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'acq_rel' clause.
Definition: SemaOpenMP.cpp:16594
clang::Sema::checkInitMethod
bool checkInitMethod(ObjCMethodDecl *method, QualType receiverTypeIfCall)
Check whether the given method, which must be in the 'init' family, is a valid member of that family.
Definition: SemaDeclObjC.cpp:42
clang::Sema::CodeCompleteObjCPassingType
void CodeCompleteObjCPassingType(Scope *S, ObjCDeclSpec &DS, bool IsParameter)
Definition: SemaCodeComplete.cpp:7526
clang::Sema::CheckAllocationAccess
AccessResult CheckAllocationAccess(SourceLocation OperatorLoc, SourceRange PlacementRange, CXXRecordDecl *NamingClass, DeclAccessPair FoundDecl, bool Diagnose=true)
Checks access to an overloaded operator new or delete.
Definition: SemaAccess.cpp:1714
clang::Sema::BuildOverloadedArrowExpr
ExprResult BuildOverloadedArrowExpr(Scope *S, Expr *Base, SourceLocation OpLoc, bool *NoArrowOperatorFound=nullptr)
BuildOverloadedArrowExpr - Build a call to an overloaded operator-> (if one exists),...
Definition: SemaOverload.cpp:14858
clang::Sema::AllowedExplicit::None
@ None
Allow no explicit functions to be used.
clang::Sema::CheckCompletedCXXClass
void CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record)
Perform semantic checks on a class definition that has been completing, introducing implicitly-declar...
Definition: SemaDeclCXX.cpp:6753
clang::Sema::AddMsStructLayoutForRecord
void AddMsStructLayoutForRecord(RecordDecl *RD)
AddMsStructLayoutForRecord - Adds ms_struct layout attribute to record.
Definition: SemaAttr.cpp:86
clang::Sema::NameClassification::getTemplateName
TemplateName getTemplateName() const
Definition: Sema.h:2853
clang::Sema::CheckSubscriptingKind
ObjCSubscriptKind CheckSubscriptingKind(Expr *FromE)
CheckSubscriptingKind - This routine decide what type of indexing represented by "FromE" is being don...
Definition: SemaPseudoObject.cpp:1045
clang::Sema::ExtVectorDeclsType
LazyVector< TypedefNameDecl *, ExternalSemaSource, &ExternalSemaSource::ReadExtVectorDecls, 2, 2 > ExtVectorDeclsType
Definition: Sema.h:991
clang::Sema::ActOnFinishCXXInClassMemberInitializer
void ActOnFinishCXXInClassMemberInitializer(Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
This is invoked after parsing an in-class initializer for a non-static C++ class member,...
Definition: SemaDeclCXX.cpp:4050
clang::Sema::ExpressionEvaluationContext::PotentiallyEvaluatedIfUsed
@ PotentiallyEvaluatedIfUsed
The current expression is potentially evaluated, but any declarations referenced inside that expressi...
clang::Sema::startOpenMPLoop
void startOpenMPLoop()
If the current region is a loop-based region, mark the start of the loop construct.
Definition: SemaOpenMP.cpp:2311
clang::Sema::isCast
static bool isCast(CheckedConversionKind CCK)
Definition: Sema.h:11967
clang::Sema::ActOnPragmaFPEvalMethod
void ActOnPragmaFPEvalMethod(SourceLocation Loc, LangOptions::FPEvalMethodKind Value)
Definition: SemaAttr.cpp:473
clang::Sema::FixOverloadedFunctionReference
Expr * FixOverloadedFunctionReference(Expr *E, DeclAccessPair FoundDecl, FunctionDecl *Fn)
FixOverloadedFunctionReference - E is an expression that refers to a C++ overloaded function (possibl...
Definition: SemaOverload.cpp:15124
clang::Sema::DAR_Failed
@ DAR_Failed
Definition: Sema.h:8953
clang::Sema::DefineImplicitCopyConstructor
void DefineImplicitCopyConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
DefineImplicitCopyConstructor - Checks for feasibility of defining this constructor as the copy const...
Definition: SemaDeclCXX.cpp:15132
clang::ExternalSemaSource::ReadUnusedFileScopedDecls
virtual void ReadUnusedFileScopedDecls(SmallVectorImpl< const DeclaratorDecl * > &Decls)
Read the set of unused file-scope declarations known to the external Sema source.
Definition: ExternalSemaSource.h:115
clang::Sema::ActOnDependentTag
TypeResult ActOnDependentTag(Scope *S, unsigned TagSpec, TagUseKind TUK, const CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation TagLoc, SourceLocation NameLoc)
Definition: SemaTemplate.cpp:10346
clang::Sema::SrcLocSet
llvm::SmallSet< SourceLocation, 2 > SrcLocSet
Definition: Sema.h:9590
clang::Sema::FST_OSTrace
@ FST_OSTrace
Definition: Sema.h:13329
clang::Sema::IsMemberPointerConversion
bool IsMemberPointerConversion(Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType)
IsMemberPointerConversion - Determines whether the conversion of the expression From,...
Definition: SemaOverload.cpp:3088
clang::Sema::AlignPackIncludeState::CurrentValue
AlignPackInfo CurrentValue
Definition: Sema.h:861
clang::Sema::ActOnFinishTrailingRequiresClause
ExprResult ActOnFinishTrailingRequiresClause(ExprResult ConstraintExpr)
Definition: SemaDeclCXX.cpp:4028
clang::SYCLIntegrationHeader::addSpecConstant
void addSpecConstant(StringRef IDName, QualType IDType)
Registers a specialization constant to emit info for it into the header.
Definition: SemaSYCL.cpp:4843
clang::SYCLIntegrationHeader::kind_last
@ kind_last
Definition: Sema.h:322
clang::Sema::CodeCompleteObjCSelector
void CodeCompleteObjCSelector(Scope *S, ArrayRef< IdentifierInfo * > SelIdents)
Definition: SemaCodeComplete.cpp:8206
clang::Sema::BuildPointerType
QualType BuildPointerType(QualType T, SourceLocation Loc, DeclarationName Entity)
Build a pointer type.
Definition: SemaType.cpp:2139
clang::Sema::CheckAttrNoArgs
bool CheckAttrNoArgs(const ParsedAttr &CurrAttr)
clang::Sema::isEquivalentInternalLinkageDeclaration
bool isEquivalentInternalLinkageDeclaration(const NamedDecl *A, const NamedDecl *B)
Determine if A and B are equivalent internal linkage declarations from different modules,...
Definition: SemaOverload.cpp:9974
clang::Sema::UnmarkAsLateParsedTemplate
void UnmarkAsLateParsedTemplate(FunctionDecl *FD)
Definition: SemaTemplate.cpp:10960
clang::Sema::CheckTransparentUnionArgumentConstraints
AssignConvertType CheckTransparentUnionArgumentConstraints(QualType ArgType, ExprResult &RHS)
Definition: SemaExpr.cpp:9822
clang::Sema::checkPseudoObjectAssignment
ExprResult checkPseudoObjectAssignment(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opcode, Expr *LHS, Expr *RHS)
Definition: SemaPseudoObject.cpp:1582
clang::Sema::BuildCallExpr
ExprResult BuildCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
BuildCallExpr - Handle a call to Fn with the specified array of arguments.
Definition: SemaExpr.cpp:6656
DeclSpec.h
clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Sema::ReuseLambdaContextDecl_t, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other)
Definition: Sema.h:13808
clang::Sema::hasCStrMethod
bool hasCStrMethod(const Expr *E)
Check to see if a given expression could have '.c_str()' called on it.
Definition: SemaChecking.cpp:9378
clang::Sema::ActOnCXXNullPtrLiteral
ExprResult ActOnCXXNullPtrLiteral(SourceLocation Loc)
ActOnCXXNullPtrLiteral - Parse 'nullptr'.
Definition: SemaExprCXX.cpp:814
clang::Sema::BuildObjCArrayLiteral
ExprResult BuildObjCArrayLiteral(SourceRange SR, MultiExprArg Elements)
Definition: SemaExprObjC.cpp:793
clang::Sema::ActOnPostfixUnaryOp
ExprResult ActOnPostfixUnaryOp(Scope *S, SourceLocation OpLoc, tok::TokenKind Kind, Expr *Input)
Definition: SemaExpr.cpp:4776
clang::Sema::MethodPool
GlobalMethodPool MethodPool
Method Pool - allows efficient lookup when typechecking messages to "id".
Definition: Sema.h:1657
clang::Sema::getPrintable
static const IdentifierInfo * getPrintable(const IdentifierInfo *II)
Definition: Sema.h:2383
clang::Sema::ActOnPropertyImplDecl
Decl * ActOnPropertyImplDecl(Scope *S, SourceLocation AtLoc, SourceLocation PropertyLoc, bool ImplKind, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar, SourceLocation PropertyIvarLoc, ObjCPropertyQueryKind QueryKind)
ActOnPropertyImplDecl - This routine performs semantic checks and builds the AST node for a property ...
Definition: SemaObjCProperty.cpp:1077
clang::Sema::AtomicArgumentOrder::API
@ API
clang::Sema::AP_Explicit
@ AP_Explicit
The availability attribute was specified explicitly next to the declaration.
Definition: Sema.h:3668
clang::Sema::TemplateInstCallbacks
std::vector< std::unique_ptr< TemplateInstantiationCallback > > TemplateInstCallbacks
The template instantiation callbacks to trace or track instantiations (objects can be chained).
Definition: Sema.h:9259
clang::CXXScopeSpec
Represents a C++ nested-name-specifier or a global scope specifier.
Definition: DeclSpec.h:64
clang::Sema::isSimpleTypeSpecifier
bool isSimpleTypeSpecifier(tok::TokenKind Kind) const
Determine whether the token kind starts a simple-type-specifier.
Definition: SemaDecl.cpp:125
clang::isComputedNoexcept
bool isComputedNoexcept(ExceptionSpecificationType ESpecType)
Definition: ExceptionSpecificationType.h:39
clang::Sema::ActOnFinishFunctionDeclarationDeclarator
void ActOnFinishFunctionDeclarationDeclarator(Declarator &D)
Called after parsing a function declarator belonging to a function declaration.
Definition: SemaDeclCXX.cpp:18368
clang::Sema::IsOverload
bool IsOverload(FunctionDecl *New, FunctionDecl *Old, bool IsForUsingDecl, bool ConsiderCudaAttrs=true, bool ConsiderRequiresClauses=true)
Definition: SemaOverload.cpp:1141
clang::Sema::PragmaStack::hasValue
bool hasValue() const
Definition: Sema.h:839
clang::Sema::ActOnSuperClassOfClassInterface
void ActOnSuperClassOfClassInterface(Scope *S, SourceLocation AtInterfaceLoc, ObjCInterfaceDecl *IDecl, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperName, SourceLocation SuperLoc, ArrayRef< ParsedType > SuperTypeArgs, SourceRange SuperTypeArgsRange)
Definition: SemaDeclObjC.cpp:542
clang::Sema::FunctionEmissionStatus
FunctionEmissionStatus
Status of the function emission on the CUDA/HIP/OpenMP host/device attrs.
Definition: Sema.h:4515
clang::ClassTemplatePartialSpecializationDecl
Definition: DeclTemplate.h:2075
ExprOpenMP.h
clang::Sema::getCapturedDeclRefType
QualType getCapturedDeclRefType(VarDecl *Var, SourceLocation Loc)
Given a variable, determine the type that a reference to that variable will have in the given scope.
Definition: SemaExpr.cpp:18587
clang::Sema::TDK_SubstitutionFailure
@ TDK_SubstitutionFailure
Substitution of the deduced template argument values resulted in an error.
Definition: Sema.h:8831
clang::PrintingPolicy
Describes how types, statements, expressions, and declarations should be printed.
Definition: PrettyPrinter.h:57
clang::Sema::SelectorsForTypoCorrection
const ObjCMethodDecl * SelectorsForTypoCorrection(Selector Sel, QualType ObjectType=QualType())
Definition: SemaDeclObjC.cpp:3693
clang::Sema::GetNameFromUnqualifiedId
DeclarationNameInfo GetNameFromUnqualifiedId(const UnqualifiedId &Name)
Retrieves the declaration name from a parsed unqualified-id.
Definition: SemaDecl.cpp:5540
clang::Sema::DiagnoseAlwaysNonNullPointer
void DiagnoseAlwaysNonNullPointer(Expr *E, Expr::NullPointerConstantKind NullType, bool IsEqual, SourceRange Range)
Diagnose pointers that are always non-null.
Definition: SemaChecking.cpp:13990
clang::Sema::NTCUC_DefaultInitializedObject
@ NTCUC_DefaultInitializedObject
Definition: Sema.h:3094
clang::Sema::ActOnStartOfLambdaDefinition
void ActOnStartOfLambdaDefinition(LambdaIntroducer &Intro, Declarator &ParamInfo, Scope *CurScope)
ActOnStartOfLambdaDefinition - This is called just before we start parsing the body of a lambda; it a...
Definition: SemaLambda.cpp:891
clang::Sema::BuildCallToMemberFunction
ExprResult BuildCallToMemberFunction(Scope *S, Expr *MemExpr, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig=nullptr, bool IsExecConfig=false, bool AllowRecovery=false)
BuildCallToMemberFunction - Build a call to a member function.
Definition: SemaOverload.cpp:14314
clang::Sema::CCK_FunctionalCast
@ CCK_FunctionalCast
A functional-style cast.
Definition: Sema.h:11960
clang::Sema::ActOnObjCReenterContainerContext
void ActOnObjCReenterContainerContext(DeclContext *DC)
Definition: SemaDecl.cpp:16914
clang::Sema::LastEmittedCodeSynthesisContextDepth
unsigned LastEmittedCodeSynthesisContextDepth
The depth of the context stack at the point when the most recent error or warning was produced.
Definition: Sema.h:9251
clang::Sema::LookupBuiltin
bool LookupBuiltin(LookupResult &R)
Lookup a builtin function, when name lookup would otherwise fail.
Definition: SemaLookup.cpp:928
clang::Sema::ActOnOpenMPThreadsClause
OMPClause * ActOnOpenMPThreadsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'threads' clause.
Definition: SemaOpenMP.cpp:16614
clang::sema::Capture
Definition: ScopeInfo.h:528
clang::Sema::NameClassification::getKind
NameClassificationKind getKind() const
Definition: Sema.h:2836
clang::Sema::DiscardMisalignedMemberAddress
void DiscardMisalignedMemberAddress(const Type *T, Expr *E)
This function checks if the expression is in the sef of potentially misaligned members and it is conv...
Definition: SemaChecking.cpp:17024
LocInfoType.h
clang::ExportDecl
Represents a C++ Modules TS module export declaration.
Definition: Decl.h:4563
clang::Sema::PCSK_Data
@ PCSK_Data
Definition: Sema.h:631
clang::Sema::syclDeviceDecls
llvm::SetVector< Decl * > & syclDeviceDecls()
Definition: Sema.h:13659
clang::diag::Group
Group
Definition: DiagnosticCategories.h:23
clang::Sema::BuildCaptureField
FieldDecl * BuildCaptureField(RecordDecl *RD, const sema::Capture &Capture)
Build a FieldDecl suitable to hold the given capture.
Definition: SemaLambda.cpp:1700
clang::Sema::AlignPackInfo::Mode
Mode
Definition: Sema.h:669
clang::Sema::StartOpenMPDSABlock
void StartOpenMPDSABlock(OpenMPDirectiveKind K, const DeclarationNameInfo &DirName, Scope *CurScope, SourceLocation Loc)
Called on start of new data sharing attribute block.
Definition: SemaOpenMP.cpp:2534
clang::Sema::maybeExtendBlockObject
void maybeExtendBlockObject(ExprResult &E)
Do an explicit extend of the given block pointer if we're in ARC.
Definition: SemaExpr.cpp:7425
clang::Sema::ModuleImportState::FirstDecl
@ FirstDecl
Parsing the first decl in a TU.
clang::Sema::LookupOMPMapperName
@ LookupOMPMapperName
Look up the name of an OpenMP user-defined mapper.
Definition: Sema.h:4348
clang::Sema::getStdNamespace
NamespaceDecl * getStdNamespace() const
Definition: SemaDeclCXX.cpp:11287
clang::Sema::IsStringInit
bool IsStringInit(Expr *Init, const ArrayType *AT)
Definition: SemaInit.cpp:145
clang::Sema::ActOnMemberAccessExtraArgs::Id
UnqualifiedId & Id
Definition: Sema.h:5739
clang::Sema::AbstractParamType
@ AbstractParamType
Definition: Sema.h:7802
clang::Sema::DeviceDiagnosticReason::CudaDevice
@ CudaDevice
CUDA specific diagnostics.
clang::Sema::TryCapture_ExplicitByRef
@ TryCapture_ExplicitByRef
Definition: Sema.h:5400
clang::Sema::CCEK_ArrayBound
@ CCEK_ArrayBound
Array bound in array declarator or new-expression.
Definition: Sema.h:3866
clang::Sema::SuppressedDiagnostics
SuppressedDiagnosticsMap SuppressedDiagnostics
Definition: Sema.h:9297
clang::Sema::BuildMemberInitializer
MemInitResult BuildMemberInitializer(ValueDecl *Member, Expr *Init, SourceLocation IdLoc)
Definition: SemaDeclCXX.cpp:4398
clang::Sema::CheckTemplateTypeArgument
bool CheckTemplateTypeArgument(TemplateTypeParmDecl *Param, TemplateArgumentLoc &Arg, SmallVectorImpl< TemplateArgument > &Converted)
Definition: SemaTemplate.cpp:4954
Identifier
StringRef Identifier
Definition: Format.cpp:2558
clang::InitializationSequence
Describes the sequence of initializations required to initialize a given object or reference with a s...
Definition: Initialization.h:788
clang::Sema::ActOnPragmaMSSection
void ActOnPragmaMSSection(SourceLocation PragmaLocation, int SectionFlags, StringLiteral *SegmentName)
Called on well formed #pragma section().
Definition: SemaAttr.cpp:724
clang::Sema::CheckConversionDeclarator
void CheckConversionDeclarator(Declarator &D, QualType &R, StorageClass &SC)
CheckConversionDeclarator - Called by ActOnDeclarator to check the well-formednes of the conversion f...
Definition: SemaDeclCXX.cpp:10728
clang::Sema::ActOnOpenMPMapClause
OMPClause * ActOnOpenMPMapClause(ArrayRef< OpenMPMapModifierKind > MapTypeModifiers, ArrayRef< SourceLocation > MapTypeModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, OpenMPMapClauseKind MapType, bool IsMapTypeImplicit, SourceLocation MapLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, bool NoDiagnose=false, ArrayRef< Expr * > UnresolvedMappers=llvm::None)
Called on well-formed 'map' clause.
Definition: SemaOpenMP.cpp:21129
clang::Sema::DiagnoseHiddenVirtualMethods
void DiagnoseHiddenVirtualMethods(CXXMethodDecl *MD)
Diagnose methods which overload virtual methods in a base class without overriding any.
Definition: SemaDeclCXX.cpp:10028
clang::PreferredTypeBuilder::PreferredTypeBuilder
PreferredTypeBuilder(bool Enabled)
Definition: Sema.h:474
clang::Sema::ActOnStmtExpr
ExprResult ActOnStmtExpr(Scope *S, SourceLocation LPLoc, Stmt *SubStmt, SourceLocation RPLoc)
Definition: SemaExpr.cpp:15583
clang::FunctionType
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: Type.h:3561
clang::Sema::ActOnCXXGlobalScopeSpecifier
bool ActOnCXXGlobalScopeSpecifier(SourceLocation CCLoc, CXXScopeSpec &SS)
The parser has parsed a global nested-name-specifier '::'.
Definition: SemaCXXScopeSpec.cpp:286
clang::Sema::KernelUseAssembly
@ KernelUseAssembly
Definition: Sema.h:13688
clang::Sema::ExprEvalContexts
SmallVector< ExpressionEvaluationContextRecord, 8 > ExprEvalContexts
A stack of expression evaluation contexts.
Definition: Sema.h:1527
clang::VarTemplateSpecializationDecl
Represents a variable template specialization, which refers to a variable template with a given set o...
Definition: DeclTemplate.h:2664
clang::Sema::ActOnOpenMPDeclareReductionDirectiveEnd
DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveEnd(Scope *S, DeclGroupPtrTy DeclReductions, bool IsValid)
Called at the end of '#pragma omp declare reduction'.
Definition: SemaOpenMP.cpp:21416
clang::Sema::AddAnyMethodToGlobalPool
void AddAnyMethodToGlobalPool(Decl *D)
AddAnyMethodToGlobalPool - Add any method, instance or factory to global pool.
Definition: SemaDeclObjC.cpp:329
clang::Sema::BuildCXXFunctionalCastExpr
ExprResult BuildCXXFunctionalCastExpr(TypeSourceInfo *TInfo, QualType Type, SourceLocation LParenLoc, Expr *CastExpr, SourceLocation RParenLoc)
Definition: SemaCast.cpp:3259
clang::Sema::OffsetOfComponent::LocStart
SourceLocation LocStart
Definition: Sema.h:5921
clang::Sema::AFS_Global
@ AFS_Global
Only look for allocation functions in the global scope.
Definition: Sema.h:6707
clang::Sema::FinishObjCForCollectionStmt
StmtResult FinishObjCForCollectionStmt(Stmt *ForCollection, Stmt *Body)
FinishObjCForCollectionStmt - Attach the body to a objective-C foreach statement.
Definition: SemaStmt.cpp:3054
clang::Sema::ProduceTemplateArgumentSignatureHelp
QualType ProduceTemplateArgumentSignatureHelp(TemplateTy, ArrayRef< ParsedTemplateArgument >, SourceLocation LAngleLoc)
Definition: SemaCodeComplete.cpp:6282
clang::Sema::CodeCompleteObjCAtStatement
void CodeCompleteObjCAtStatement(Scope *S)
Definition: SemaCodeComplete.cpp:7188
clang::Sema::ActOnOpenMPBarrierDirective
StmtResult ActOnOpenMPBarrierDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp barrier'.
Definition: SemaOpenMP.cpp:10740
clang::CapturedDecl
Represents the body of a CapturedStmt, and serves as its DeclContext.
Definition: Decl.h:4368
clang::Sema::SynthesizedFunctionScope::~SynthesizedFunctionScope
~SynthesizedFunctionScope()
Definition: Sema.h:1242
clang::Sema::OffsetOfComponent::isBrackets
bool isBrackets
Definition: Sema.h:5922
clang::MSVtorDispMode
MSVtorDispMode
In the Microsoft ABI, this controls the placement of virtual displacement members used to implement v...
Definition: LangOptions.h:54
clang::Sema::ActOnPragmaAttributeEmptyPush
void ActOnPragmaAttributeEmptyPush(SourceLocation PragmaLoc, const IdentifierInfo *Namespace)
Definition: SemaAttr.cpp:971
clang::sema::BlockScopeInfo
Retains information about a block that is currently being parsed.
Definition: ScopeInfo.h:748
clang::Sema::getCurCapturedRegion
sema::CapturedRegionScopeInfo * getCurCapturedRegion()
Retrieve the current captured region, if any.
Definition: Sema.cpp:2741
clang::Sema::LookupLabel
@ LookupLabel
Label name lookup.
Definition: Sema.h:4310
clang::Sema::CheckCastAlign
void CheckCastAlign(Expr *Op, QualType T, SourceRange TRange)
CheckCastAlign - Implements -Wcast-align, which warns when a pointer cast increases the alignment req...
Definition: SemaChecking.cpp:15452
clang::Sema::ImmediateDiagBuilder::operator<<
const friend ImmediateDiagBuilder & operator<<(const ImmediateDiagBuilder &Diag, const T &Value)
Teach operator<< to produce an object of the correct type.
Definition: Sema.h:1857
clang::Token
Token - This structure provides full information about a lexed token.
Definition: Token.h:34
clang::Sema::BuildSYCLIntelFPGALoopCountAttr
SYCLIntelFPGALoopCountAttr * BuildSYCLIntelFPGALoopCountAttr(const AttributeCommonInfo &CI, Expr *E)
Definition: SemaStmtAttr.cpp:415
clang::Sema::TemplateNameKindForDiagnostics::Concept
@ Concept
ASTFwd.h
clang::Sema::MarkUnusedFileScopedDecl
void MarkUnusedFileScopedDecl(const DeclaratorDecl *D)
If it's a file scoped decl that must warn if not used, keep track of it.
Definition: SemaDecl.cpp:1829
clang::Sema::PopDeclContext
void PopDeclContext()
Definition: SemaDecl.cpp:1312
clang::Sema::ActOnEndOfTranslationUnitFragment
void ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind)
Definition: Sema.cpp:1076
clang::CallExpr::ADLCallKind::NotADL
@ NotADL
clang::Sema::TemplateParamListContext
TemplateParamListContext
The context in which we are checking a template parameter list.
Definition: Sema.h:7997
clang::Sema::mergeBTFDeclTagAttr
BTFDeclTagAttr * mergeBTFDeclTagAttr(Decl *D, const BTFDeclTagAttr &AL)
clang::Sema::BuildLambdaExpr
ExprResult BuildLambdaExpr(SourceLocation StartLoc, SourceLocation EndLoc, sema::LambdaScopeInfo *LSI)
Complete a lambda-expression having processed and attached the lambda body.
Definition: SemaLambda.cpp:1759
clang::Sema::DiagnoseClassNameShadow
bool DiagnoseClassNameShadow(DeclContext *DC, DeclarationNameInfo Info)
DiagnoseClassNameShadow - Implement C++ [class.mem]p13: If T is the name of a class,...
Definition: SemaDecl.cpp:5817
clang::Sema::POAK_Natural
@ POAK_Natural
Definition: Sema.h:10353
clang::Sema::AddMethodCandidate
void AddMethodCandidate(DeclAccessPair FoundDecl, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversion=false, OverloadCandidateParamOrder PO={})
AddMethodCandidate - Adds a named decl (which is some kind of method) as a method candidate to the gi...
Definition: SemaOverload.cpp:6882
clang::Sema::FindDeallocationFunction
bool FindDeallocationFunction(SourceLocation StartLoc, CXXRecordDecl *RD, DeclarationName Name, FunctionDecl *&Operator, bool Diagnose=true)
Definition: SemaExprCXX.cpp:3182
clang::Sema::BuildLiteralOperatorCall
ExprResult BuildLiteralOperatorCall(LookupResult &R, DeclarationNameInfo &SuffixInfo, ArrayRef< Expr * > Args, SourceLocation LitEndLoc, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr)
BuildLiteralOperatorCall - Build a UserDefinedLiteral by creating a call to a literal operator descri...
Definition: SemaOverload.cpp:14975
clang::Sema::LookupProtocol
ObjCProtocolDecl * LookupProtocol(IdentifierInfo *II, SourceLocation IdLoc, RedeclarationKind Redecl=NotForRedeclaration)
Find the protocol with the given name, if any.
Definition: SemaLookup.cpp:3104
clang::Sema::NameClassification::TypeTemplate
static NameClassification TypeTemplate(TemplateName Name)
Definition: Sema.h:2806
clang::DeclarationName
The name of a declaration.
Definition: DeclarationName.h:143
clang::Sema::ActOnTypedefedProtocols
void ActOnTypedefedProtocols(SmallVectorImpl< Decl * > &ProtocolRefs, SmallVectorImpl< SourceLocation > &ProtocolLocs, IdentifierInfo *SuperName, SourceLocation SuperLoc)
ActOnTypedefedProtocols - this action finds protocol list as part of the typedef'ed use for a qualifi...
Definition: SemaDeclObjC.cpp:1109
clang::Sema::LOLR_Error
@ LOLR_Error
The lookup resulted in an error.
Definition: Sema.h:4382
End
SourceLocation End
Definition: USRLocFinder.cpp:167
clang::Sema::CheckPtrComparisonWithNullChar
void CheckPtrComparisonWithNullChar(ExprResult &E, ExprResult &NullE)
Definition: SemaExpr.cpp:12169
clang::Sema::PragmaAttributeEntry::MatchRules
SmallVector< attr::SubjectMatchRule, 4 > MatchRules
Definition: Sema.h:911
clang::AttributeCommonInfo::Syntax
Syntax
The style used to specify an attribute.
Definition: AttributeCommonInfo.h:25
clang::Sema::NameClassification::UndeclaredNonType
static NameClassification UndeclaredNonType()
Definition: Sema.h:2798
clang::Sema::CollectStats
bool CollectStats
Flag indicating whether or not to collect detailed statistics.
Definition: Sema.h:593
clang::Sema::isInOpenMPAssumeScope
bool isInOpenMPAssumeScope() const
Check if there is an active global omp begin assumes directive.
Definition: Sema.h:11017
clang::Sema::PendingInstantiations
std::deque< PendingImplicitInstantiation > PendingInstantiations
The queue of implicit template instantiations that are required but have not yet been performed.
Definition: Sema.h:9614
clang::Sema::OffsetOfComponent
Definition: Sema.h:5920
clang::Sema::ExternalDeclarations
SmallVector< VarDecl *, 4 > ExternalDeclarations
All the external declarations encoutered and used in the TU.
Definition: Sema.h:1041
clang::Sema::ConditionKind
ConditionKind
Definition: Sema.h:12561
clang::Sema::ActOnOpenMPInteropDirective
StmtResult ActOnOpenMPInteropDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp interop'.
Definition: SemaOpenMP.cpp:16649
clang::Sema::ActOnOpenMPAffinityClause
OMPClause * ActOnOpenMPAffinityClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, Expr *Modifier, ArrayRef< Expr * > Locators)
Called on well-formed 'affinity' clause.
Definition: SemaOpenMP.cpp:22756
clang::Sema::DiagnoseUnusedButSetDecl
void DiagnoseUnusedButSetDecl(const VarDecl *VD)
If VD is set but not otherwise used, diagnose, for a parameter or a variable.
Definition: SemaDecl.cpp:2000
clang::Sema::BuildCXXFoldExpr
ExprResult BuildCXXFoldExpr(UnresolvedLookupExpr *Callee, SourceLocation LParenLoc, Expr *LHS, BinaryOperatorKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc, Optional< unsigned > NumExpansions)
Definition: SemaTemplateVariadic.cpp:1250
clang::Sema::ActOnOpenMPParallelMasterTaskLoopDirective
StmtResult ActOnOpenMPParallelMasterTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel master taskloop' after parsing of the associated statemen...
Definition: SemaOpenMP.cpp:13098
clang::Sema::ActOnOpenMPCopyinClause
OMPClause * ActOnOpenMPCopyinClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'copyin' clause.
Definition: SemaOpenMP.cpp:19365
clang::Sema::IntToPointer
@ IntToPointer
IntToPointer - The assignment converts an int to a pointer, which we accept as an extension.
Definition: Sema.h:12120
clang::Sema::setExceptionMode
void setExceptionMode(SourceLocation Loc, LangOptions::FPExceptionModeKind)
Called to set exception behavior for floating point operations.
Definition: SemaAttr.cpp:1176
clang::Sema::EnterTemplatedContext
void EnterTemplatedContext(Scope *S, DeclContext *DC)
Enter a template parameter scope, after it's been associated with a particular DeclContext.
Definition: SemaDecl.cpp:1388
clang::ModuleIdPath
ArrayRef< std::pair< IdentifierInfo *, SourceLocation > > ModuleIdPath
A sequence of identifier/location pairs used to describe a particular module or submodule,...
Definition: ModuleLoader.h:32
clang::Sema::BuildExpressionFromIntegralTemplateArgument
ExprResult BuildExpressionFromIntegralTemplateArgument(const TemplateArgument &Arg, SourceLocation Loc)
Construct a new expression that refers to the given integral template argument with the given source-...
Definition: SemaTemplate.cpp:7597
clang::Sema::ActOnPragmaWeakID
void ActOnPragmaWeakID(IdentifierInfo *WeakName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc)
ActOnPragmaWeakID - Called on well formed #pragma weak ident.
Definition: SemaDecl.cpp:18784
clang::Sema::VTablesUsed
llvm::DenseMap< CXXRecordDecl *, bool > VTablesUsed
The set of classes whose vtables have been used within this translation unit, and a bit that will be ...
Definition: Sema.h:7505
clang::Sema::ActOnPragmaFEnvAccess
void ActOnPragmaFEnvAccess(SourceLocation Loc, bool IsEnabled)
ActOnPragmaFenvAccess - Called on well formed #pragma STDC FENV_ACCESS.
Definition: SemaAttr.cpp:1184
clang::Sema::MarkDevices
void MarkDevices()
Definition: SemaSYCL.cpp:3964
clang::Sema::CompoundScopeRAII
A RAII object to enter scope of a compound statement.
Definition: Sema.h:5014
clang::Sema::AR_delayed
@ AR_delayed
Definition: Sema.h:7718
clang::Sema::checkUnsafeExprAssigns
void checkUnsafeExprAssigns(SourceLocation Loc, Expr *LHS, Expr *RHS)
checkUnsafeExprAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained expressi...
Definition: SemaChecking.cpp:16321
clang::Sema::CodeSynthesisContextLookupModules
SmallVector< Module *, 16 > CodeSynthesisContextLookupModules
Extra modules inspected when performing a lookup during a template instantiation.
Definition: Sema.h:9213
clang::Sema::ActOnBlockError
void ActOnBlockError(SourceLocation CaretLoc, Scope *CurScope)
ActOnBlockError - If there is an error parsing a block, this callback is invoked to pop the informati...
Definition: SemaExpr.cpp:16026
clang::sema::DelayedDiagnostic
A diagnostic message which has been conditionally emitted pending the complete parsing of the current...
Definition: DelayedDiagnostic.h:124
clang::Sema::FST_Strfmon
@ FST_Strfmon
Definition: Sema.h:13326
clang::sema::CapturedRegionScopeInfo
Retains information about a captured region.
Definition: ScopeInfo.h:774
clang::Sema::FilterAcceptableTemplateNames
void FilterAcceptableTemplateNames(LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true)
Definition: SemaTemplate.cpp:143
clang::Sema::ActOnOpenMPCollapseClause
OMPClause * ActOnOpenMPCollapseClause(Expr *NumForLoops, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'collapse' clause.
Definition: SemaOpenMP.cpp:15834
clang::Sema::ActOnClassMessage
ExprResult ActOnClassMessage(Scope *S, ParsedType Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
Definition: SemaExprObjC.cpp:2760
clang::Sema::CheckObjCMethodOverrides
void CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod, ObjCInterfaceDecl *CurrentClass, ResultTypeCompatibilityKind RTC)
Definition: SemaDeclObjC.cpp:4425
clang::Sema::isUnevaluatedContext
bool isUnevaluatedContext() const
Determines whether we are currently in a context that is not evaluated as per C++ [expr] p5.
Definition: Sema.h:9508
clang::Sema::DeclareImplicitMoveAssignment
CXXMethodDecl * DeclareImplicitMoveAssignment(CXXRecordDecl *ClassDecl)
Declare the implicit move assignment operator for the given class.
Definition: SemaDeclCXX.cpp:14663
clang::Sema::GlobalMethodPool::find
iterator find(Selector Sel)
Definition: Sema.h:1640
clang::Sema::ActOnFinishLinkageSpecification
Decl * ActOnFinishLinkageSpecification(Scope *S, Decl *LinkageSpec, SourceLocation RBraceLoc)
ActOnFinishLinkageSpecification - Complete the definition of the C++ linkage specification LinkageSpe...
Definition: SemaDeclCXX.cpp:16330
clang::Sema::CheckCaseExpression
bool CheckCaseExpression(Expr *E)
Definition: SemaExpr.cpp:20325
clang::Sema::ExpressionEvaluationContextRecord::EK_Decltype
@ EK_Decltype
Definition: Sema.h:1483
clang::SourceManager
This class handles loading and caching of source files into memory.
Definition: SourceManager.h:626
clang::Sema::ParsingClassState
ProcessingContextState ParsingClassState
Definition: Sema.h:5309
clang::Sema::FPFeaturesStateRAII::getOverrides
FPOptionsOverride getOverrides()
Definition: Sema.h:1733
clang::Sema::isInOpenMPDeclareVariantScope
bool isInOpenMPDeclareVariantScope() const
Can we exit an OpenMP declare variant scope at the moment.
Definition: Sema.h:10887
clang::Sema::CheckOverridingFunctionReturnType
bool CheckOverridingFunctionReturnType(const CXXMethodDecl *New, const CXXMethodDecl *Old)
CheckOverridingFunctionReturnType - Checks whether the return types are covariant,...
Definition: SemaDeclCXX.cpp:17462
clang::Sema::ActOnGCCAsmStmt
StmtResult ActOnGCCAsmStmt(SourceLocation AsmLoc, bool IsSimple, bool IsVolatile, unsigned NumOutputs, unsigned NumInputs, IdentifierInfo **Names, MultiExprArg Constraints, MultiExprArg Exprs, Expr *AsmString, MultiExprArg Clobbers, unsigned NumLabels, SourceLocation RParenLoc)
Definition: SemaStmtAsm.cpp:241
clang::TypeError
TypeResult TypeError()
Definition: Ownership.h:280
clang::Sema::MarkVirtualBaseDestructorsReferenced
void MarkVirtualBaseDestructorsReferenced(SourceLocation Location, CXXRecordDecl *ClassDecl, llvm::SmallPtrSetImpl< const RecordType * > *DirectVirtualBases=nullptr)
Mark destructors of virtual bases of this class referenced.
Definition: SemaDeclCXX.cpp:5723
clang::Sema::CheckDistantExceptionSpec
bool CheckDistantExceptionSpec(QualType T)
CheckDistantExceptionSpec - Check if the given type is a pointer or pointer to member to a function w...
Definition: SemaExceptionSpec.cpp:188
clang::Sema::CCK_OtherCast
@ CCK_OtherCast
A cast other than a C-style cast.
Definition: Sema.h:11962
clang::Sema::CVT_Device
@ CVT_Device
Definition: Sema.h:12818
clang::Sema::ActOnDocumentableDecls
void ActOnDocumentableDecls(ArrayRef< Decl * > Group)
Definition: SemaDecl.cpp:13880
clang::EnumDecl
Represents an enum.
Definition: Decl.h:3612
clang::Sema::ActOnUsingDeclaration
Decl * ActOnUsingDeclaration(Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation TypenameLoc, CXXScopeSpec &SS, UnqualifiedId &Name, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList)
Definition: SemaDeclCXX.cpp:11740
clang::Sema::HandleDependentAccessCheck
void HandleDependentAccessCheck(const DependentDiagnostic &DD, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaAccess.cpp:1506
clang::Sema::DiagnoseDependentMemberLookup
bool DiagnoseDependentMemberLookup(LookupResult &R)
Diagnose a lookup that found results in an enclosing class during error recovery.
Definition: SemaExpr.cpp:2219
clang::Sema::ActOnTranslationUnitScope
void ActOnTranslationUnitScope(Scope *S)
Definition: Sema.cpp:123
clang::Sema::ObjCArgInfo::ArgAttrs
ParsedAttributesView ArgAttrs
ArgAttrs - Attribute list for this argument.
Definition: Sema.h:10172
clang::Sema::ActOnOpenMPCriticalDirective
StmtResult ActOnOpenMPCriticalDirective(const DeclarationNameInfo &DirName, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp critical' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10478
clang::Sema::RegisterTypeTagForDatatype
void RegisterTypeTagForDatatype(const IdentifierInfo *ArgumentKind, uint64_t MagicValue, QualType Type, bool LayoutCompatible, bool MustBeNull)
Register a magic integral constant to be used as a type tag.
Definition: SemaChecking.cpp:16881
clang::Sema::Context
ASTContext & Context
Definition: Sema.h:587
clang::Sema::CheckUnevaluatedOperand
ExprResult CheckUnevaluatedOperand(Expr *E)
Definition: SemaExprCXX.cpp:8045
clang::Sema::NC_Unknown
@ NC_Unknown
This name is not a type or template in this context, but might be something else.
Definition: Sema.h:2726
clang::Sema::BuildAddressSpaceAttr
QualType BuildAddressSpaceAttr(QualType &T, LangAS ASIdx, Expr *AddrSpace, SourceLocation AttrLoc)
BuildAddressSpaceAttr - Builds a DependentAddressSpaceType if an expression is uninstantiated.
Definition: SemaType.cpp:6554
clang::Sema::InstantiatingTemplate::isAlreadyInstantiating
bool isAlreadyInstantiating() const
Determine whether we are already instantiating this specialization in some surrounding active instant...
Definition: Sema.h:9453
clang::Sema::ActOnCompatibilityAlias
Decl * ActOnCompatibilityAlias(SourceLocation AtCompatibilityAliasLoc, IdentifierInfo *AliasName, SourceLocation AliasLocation, IdentifierInfo *ClassName, SourceLocation ClassLocation)
ActOnCompatibilityAlias - this action is called after complete parsing of a @compatibility_alias decl...
Definition: SemaDeclObjC.cpp:1136
clang::Sema::BuildCXXUuidof
ExprResult BuildCXXUuidof(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
Build a Microsoft __uuidof expression with a type operand.
Definition: SemaExprCXX.cpp:736
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1492
clang::Sema::RebuildingImmediateInvocation
bool RebuildingImmediateInvocation
Whether the AST is currently being rebuilt to correct immediate invocations.
Definition: Sema.h:1200
clang::Sema::IncompatibleObjCQualifiedId
@ IncompatibleObjCQualifiedId
IncompatibleObjCQualifiedId - The assignment is between a qualified id type and something else (that ...
Definition: Sema.h:12177
clang::Sema::CheckNontrivialField
bool CheckNontrivialField(FieldDecl *FD)
Definition: SemaDecl.cpp:17340
clang::Sema::GetTypeForDeclaratorCast
TypeSourceInfo * GetTypeForDeclaratorCast(Declarator &D, QualType FromTy)
Definition: SemaType.cpp:5925
clang::Sema::ActOnPragmaOptimize
void ActOnPragmaOptimize(bool On, SourceLocation PragmaLoc)
Called on well formed #pragma clang optimize.
Definition: SemaAttr.cpp:1055
clang::Sema::PSK_Set
@ PSK_Set
Definition: Sema.h:656
clang::Sema::BuildInitList
ExprResult BuildInitList(SourceLocation LBraceLoc, MultiExprArg InitArgList, SourceLocation RBraceLoc)
Definition: SemaExpr.cpp:7399
clang::Sema::UPPC_ExceptionType
@ UPPC_ExceptionType
The type of an exception.
Definition: Sema.h:8483
clang::Sema::TypeTagData::LayoutCompatible
unsigned LayoutCompatible
If true, Type should be compared with other expression's types for layout-compatibility.
Definition: Sema.h:13431
clang::Sema::ConditionKind::Switch
@ Switch
An integral condition for a 'switch' statement.
clang::Sema::BuildFieldReferenceExpr
ExprResult BuildFieldReferenceExpr(Expr *BaseExpr, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, FieldDecl *Field, DeclAccessPair FoundDecl, const DeclarationNameInfo &MemberNameInfo)
Definition: SemaExprMember.cpp:1782
clang::Sema::UPPC_TypeConstraint
@ UPPC_TypeConstraint
A type constraint.
Definition: Sema.h:8501
clang::Sema::CodeSynthesisContext::SynthesisKind
SynthesisKind
The kind of template instantiation we are performing.
Definition: Sema.h:9050
clang::Sema::ActOnDoStmt
StmtResult ActOnDoStmt(SourceLocation DoLoc, Stmt *Body, SourceLocation WhileLoc, SourceLocation CondLParen, Expr *Cond, SourceLocation CondRParen)
Definition: SemaStmt.cpp:1697
clang::Sema::FieldCollector
std::unique_ptr< CXXFieldCollector > FieldCollector
FieldCollector - Collects CXXFieldDecls during parsing of C++ classes.
Definition: Sema.h:999
clang::TU_Prefix
@ TU_Prefix
The translation unit is a prefix to a translation unit, and is not complete.
Definition: LangOptions.h:763
clang::Sema::AA_Sending
@ AA_Sending
Definition: Sema.h:3752
clang::Sema::CodeCompleteNamespaceDecl
void CodeCompleteNamespaceDecl(Scope *S)
Definition: SemaCodeComplete.cpp:6596
clang::Sema::NotForRedeclaration
@ NotForRedeclaration
The lookup is a reference to this name that is not for the purpose of redeclaring the name.
Definition: Sema.h:4358
clang::Sema::ActOnOpenMPCancelDirective
StmtResult ActOnOpenMPCancelDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancel'.
Definition: SemaOpenMP.cpp:12878
clang::Sema::ActOnStringLiteral
ExprResult ActOnStringLiteral(ArrayRef< Token > StringToks, Scope *UDLScope=nullptr)
ActOnStringLiteral - The specified tokens were lexed as pasted string fragments (e....
Definition: SemaExpr.cpp:1867
clang::Sema::ResolveAddressOfOverloadedFunction
FunctionDecl * ResolveAddressOfOverloadedFunction(Expr *AddressOfExpr, QualType TargetType, bool Complain, DeclAccessPair &Found, bool *pHadMultipleCandidates=nullptr)
ResolveAddressOfOverloadedFunction - Try to resolve the address of an overloaded function (C++ [over....
Definition: SemaOverload.cpp:12379
clang::Sema::ActOnSYCLBuiltinFieldTypeExpr
ExprResult ActOnSYCLBuiltinFieldTypeExpr(ParsedType PT, Expr *Idx)
Get a value based on the type of the given field number so that callers can wrap it in a decltype() t...
Definition: SemaSYCL.cpp:171
clang::Sema::ContextualImplicitConverter::diagnoseAmbiguous
virtual SemaDiagnosticBuilder diagnoseAmbiguous(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic when there are multiple possible conversion functions.
clang::Sema::PCSA_Clear
@ PCSA_Clear
Definition: Sema.h:639
clang::Sema::ActOnDefs
void ActOnDefs(Scope *S, Decl *TagD, SourceLocation DeclStart, IdentifierInfo *ClassName, SmallVectorImpl< Decl * > &Decls)
Called whenever @defs(ClassName) is encountered in the source.
Definition: SemaDeclObjC.cpp:5082
clang::Sema::ExprCleanupObjects
SmallVector< ExprWithCleanups::CleanupObject, 8 > ExprCleanupObjects
ExprCleanupObjects - This is the stack of objects requiring cleanup that are created by the current f...
Definition: Sema.h:946
clang::ObjCObjectType
Represents a class type in Objective C.
Definition: Type.h:5894
clang::Sema::finalizeSYCLDelayedAnalysis
void finalizeSYCLDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc, DeviceDiagnosticReason Reason)
Finishes analysis of the deferred functions calls that may be not properly declared for device compil...
Definition: SemaSYCL.cpp:4136
clang::Sema::MatchTwoMethodDeclarations
bool MatchTwoMethodDeclarations(const ObjCMethodDecl *Method, const ObjCMethodDecl *PrevMethod, MethodMatchStrategy strategy=MMS_strict)
MatchTwoMethodDeclarations - Checks if two methods' type match and returns true, or false,...
Definition: SemaDeclObjC.cpp:3245
clang::Sema::SFINAETrap
RAII class used to determine whether SFINAE has trapped any errors that occur during template argumen...
Definition: Sema.h:9523
clang::Sema::ActOnTagFinishSkippedDefinition
void ActOnTagFinishSkippedDefinition(SkippedDefinitionContext Context)
Definition: SemaDecl.cpp:1333
clang::Sema::LocalEagerInstantiationScope::perform
void perform()
Definition: Sema.h:9682
clang::Sema::DefineImplicitDestructor
void DefineImplicitDestructor(SourceLocation CurrentLocation, CXXDestructorDecl *Destructor)
DefineImplicitDestructor - Checks for feasibility of defining this destructor as the default destruct...
Definition: SemaDeclCXX.cpp:13761
clang::Sema::MakeFullDiscardedValueExpr
FullExprArg MakeFullDiscardedValueExpr(Expr *Arg)
Definition: Sema.h:4994
clang::Sema::MissingImportKind::ExplicitSpecialization
@ ExplicitSpecialization
Offset
unsigned Offset
Definition: Format.cpp:2552
clang::Sema::PushNamespaceVisibilityAttr
void PushNamespaceVisibilityAttr(const VisibilityAttr *Attr, SourceLocation Loc)
PushNamespaceVisibilityAttr - Note that we've entered a namespace with a visibility attribute.
Definition: SemaAttr.cpp:1211
clang::Sema::addSYCLIntelPipeIOAttr
void addSYCLIntelPipeIOAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ID)
addSYCLIntelPipeIOAttr - Adds a pipe I/O attribute to a particular declaration.
clang::Sema::ActOnStartCategoryInterface
Decl * ActOnStartCategoryInterface(SourceLocation AtInterfaceLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, ObjCTypeParamList *typeParamList, IdentifierInfo *CategoryName, SourceLocation CategoryLoc, Decl *const *ProtoRefs, unsigned NumProtoRefs, const SourceLocation *ProtoLocs, SourceLocation EndProtoLoc, const ParsedAttributesView &AttrList)
Definition: SemaDeclObjC.cpp:1802
clang::Sema::PushParsingClass
ParsingClassState PushParsingClass()
Definition: Sema.h:5310
clang::Sema::CheckCallReturnType
bool CheckCallReturnType(QualType ReturnType, SourceLocation Loc, CallExpr *CE, FunctionDecl *FD)
CheckCallReturnType - Checks that a call expression's return type is complete.
Definition: SemaExpr.cpp:19474
clang::Sema::MarkVirtualMembersReferenced
void MarkVirtualMembersReferenced(SourceLocation Loc, const CXXRecordDecl *RD, bool ConstexprOnly=false)
MarkVirtualMembersReferenced - Will mark all members of the given CXXRecordDecl referenced.
Definition: SemaDeclCXX.cpp:17854
clang::Sema::inferCUDATargetForImplicitSpecialMember
bool inferCUDATargetForImplicitSpecialMember(CXXRecordDecl *ClassDecl, CXXSpecialMember CSM, CXXMethodDecl *MemberDecl, bool ConstRHS, bool Diagnose)
Given a implicit special member, infer its CUDA target from the calls it needs to make to underlying ...
Definition: SemaCUDA.cpp:324
clang::Sema::WarnedStackExhausted
bool WarnedStackExhausted
Definition: Sema.h:1745
clang::sema::DelayedDiagnosticPool
A collection of diagnostics which were delayed.
Definition: DelayedDiagnostic.h:263
clang::Sema::checkFinalSuspendNoThrow
bool checkFinalSuspendNoThrow(const Stmt *FinalSuspend)
Check that the expression co_await promise.final_suspend() shall not be potentially-throwing.
Definition: SemaCoroutine.cpp:694
clang::Sema::checkInitializerLifetime
void checkInitializerLifetime(const InitializedEntity &Entity, Expr *Init)
Check that the lifetime of the initializer (and its subobjects) is sufficient for initializing the en...
Definition: SemaInit.cpp:7544
clang::EnterExpressionEvaluationContext::InitListTag
InitListTag
Definition: Sema.h:13818
clang::Sema::ActOnOpenMPExecutableDirective
StmtResult ActOnOpenMPExecutableDirective(OpenMPDirectiveKind Kind, const DeclarationNameInfo &DirName, OpenMPDirectiveKind CancelRegion, ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:5837
clang::AS_none
@ AS_none
Definition: Specifiers.h:112
clang::Sema::DiagnoseDeprecatedAttribute
void DiagnoseDeprecatedAttribute(const ParsedAttr &A, StringRef NewScope, StringRef NewName)
Emit a diagnostic about the given attribute having a deprecated name, and also emit a fixit hint to g...
Definition: SemaDeclAttr.cpp:293
clang::Sema::DiagnoseAssignmentResult
bool DiagnoseAssignmentResult(AssignConvertType ConvTy, SourceLocation Loc, QualType DstType, QualType SrcType, Expr *SrcExpr, AssignmentAction Action, bool *Complained=nullptr)
DiagnoseAssignmentResult - Emit a diagnostic, if required, for the assignment conversion type specifi...
Definition: SemaExpr.cpp:16488
clang::Sema::CUDADiagIfDeviceCode
SemaDiagnosticBuilder CUDADiagIfDeviceCode(SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
Definition: SemaCUDA.cpp:728
clang::Sema::checkClassLevelDLLAttribute
void checkClassLevelDLLAttribute(CXXRecordDecl *Class)
Check class-level dllimport/dllexport attribute.
Definition: SemaDeclCXX.cpp:6297
clang::Sema::getAmbiguousPathsDisplayString
std::string getAmbiguousPathsDisplayString(CXXBasePaths &Paths)
Builds a string representing ambiguous paths from a specific derived class to different subobjects of...
Definition: SemaDeclCXX.cpp:3024
clang::Sema::AddPragmaAttributes
void AddPragmaAttributes(Scope *S, Decl *D)
Adds the attributes that have been specified using the '#pragma clang attribute push' directives to t...
Definition: SemaAttr.cpp:1013
clang::Sema::ActOnOpenMPMasterTaskLoopSimdDirective
StmtResult ActOnOpenMPMasterTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp master taskloop simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13048
clang::Sema::PerformContextuallyConvertToObjCPointer
ExprResult PerformContextuallyConvertToObjCPointer(Expr *From)
PerformContextuallyConvertToObjCPointer - Perform a contextual conversion of the expression From to a...
Definition: SemaOverload.cpp:5937
clang::FixItHint
Annotates a diagnostic with some code that should be inserted, removed, or replaced to fix the proble...
Definition: Diagnostic.h:71
clang::Sema::getObjCContainerKind
ObjCContainerKind getObjCContainerKind() const
Definition: SemaDeclObjC.cpp:3808
clang::Sema::CodeSynthesisContext::DefaultTemplateArgumentInstantiation
@ DefaultTemplateArgumentInstantiation
We are instantiating a default argument for a template parameter.
Definition: Sema.h:9060
clang::Sema::CheckFieldDecl
FieldDecl * CheckFieldDecl(DeclarationName Name, QualType T, TypeSourceInfo *TInfo, RecordDecl *Record, SourceLocation Loc, bool Mutable, Expr *BitfieldWidth, InClassInitStyle InitStyle, SourceLocation TSSL, AccessSpecifier AS, NamedDecl *PrevDecl, Declarator *D=nullptr)
Build a new FieldDecl and check its well-formedness.
Definition: SemaDecl.cpp:17149
clang::Sema::ActOnOpenMPDistributeParallelForSimdDirective
StmtResult ActOnOpenMPDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute parallel for simd' after parsing of the associated stat...
Definition: SemaOpenMP.cpp:13293
clang::LateParsedTemplate::Toks
CachedTokens Toks
Definition: Sema.h:13847
clang::Sema::CheckExplicitlyDefaultedComparison
bool CheckExplicitlyDefaultedComparison(Scope *S, FunctionDecl *MD, DefaultedComparisonKind DCK)
Definition: SemaDeclCXX.cpp:8500
clang::Sema::CXXMoveConstructor
@ CXXMoveConstructor
Definition: Sema.h:1672
clang::Diagnostic
A little helper class (which is basically a smart pointer that forwards info from DiagnosticsEngine) ...
Definition: Diagnostic.h:1553
clang::Sema::OCK_ClassExtension
@ OCK_ClassExtension
Definition: Sema.h:9947
clang::Sema::ComparisonCategoryUsage::OperatorInExpression
@ OperatorInExpression
The '<=>' operator was used in an expression and a builtin operator was selected.
clang::Sema::InstantiatingTemplate::ConstraintsCheck
Definition: Sema.h:9398
clang::Sema::WeakTopLevelDecls
SmallVectorImpl< Decl * > & WeakTopLevelDecls()
WeakTopLevelDeclDecls - access to #pragma weak-generated Decls.
Definition: Sema.h:2207
clang::Sema::getLangOpts
const LangOptions & getLangOpts() const
Definition: Sema.h:1774
clang::Sema::CheckConstructor
void CheckConstructor(CXXConstructorDecl *Constructor)
CheckConstructor - Checks a fully-formed constructor for well-formedness, issuing any diagnostics req...
Definition: SemaDeclCXX.cpp:10516
clang::Sema::AddWorkGroupSizeHintAttr
void AddWorkGroupSizeHintAttr(Decl *D, const AttributeCommonInfo &CI, Expr *XDim, Expr *YDim, Expr *ZDim)
clang::Sema::CheckParameterPacksForExpansion
bool CheckParameterPacksForExpansion(SourceLocation EllipsisLoc, SourceRange PatternRange, ArrayRef< UnexpandedParameterPack > Unexpanded, const MultiLevelTemplateArgumentList &TemplateArgs, bool &ShouldExpand, bool &RetainExpansion, Optional< unsigned > &NumExpansions)
Determine whether we could expand a pack expansion with the given set of parameter packs into separat...
Definition: SemaTemplateVariadic.cpp:668
clang::Sema::MergeCompatibleFunctionDecls
bool MergeCompatibleFunctionDecls(FunctionDecl *New, FunctionDecl *Old, Scope *S, bool MergeTypeWithOld)
Completes the merge of two function declarations that are known to be compatible.
Definition: SemaDecl.cpp:4041
IsPartialSpecialization
Definition: SemaTemplateDeduction.cpp:2775
clang::Sema::RequireCompleteType
bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID)
Definition: Sema.h:2604
clang::FunctionParmPackExpr
Represents a reference to a function parameter pack or init-capture pack that has been substituted bu...
Definition: ExprCXX.h:4397
clang::Sema::ICEConvertDiagnoser
Definition: Sema.h:3926
size_t
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
Definition: opencl-c-base.h:116
clang::Sema::NoteHiddenVirtualMethods
void NoteHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
Definition: SemaDeclCXX.cpp:10015
clang::Sema::CodeCompleteObjCPropertyGetter
void CodeCompleteObjCPropertyGetter(Scope *S)
Definition: SemaCodeComplete.cpp:7473
clang::Sema::FunctionScopeRAII::disable
void disable()
Definition: Sema.h:5037
clang::Sema::CheckMatrixElementwiseOperands
QualType CheckMatrixElementwiseOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign)
Type checking for matrix binary operators.
Definition: SemaExpr.cpp:12913
clang::Sema::DiagnosePropertyAccessorMismatch
bool DiagnosePropertyAccessorMismatch(ObjCPropertyDecl *PD, ObjCMethodDecl *Getter, SourceLocation Loc)
Definition: SemaObjCProperty.cpp:1709
clang::Sema::TypeTagData::MustBeNull
unsigned MustBeNull
Definition: Sema.h:13432
clang::Sema::getPrintable
static SourceRange getPrintable(const Expr *E)
Definition: Sema.h:2390
clang::Sema::ActOnOpenMPRelaxedClause
OMPClause * ActOnOpenMPRelaxedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'relaxed' clause.
Definition: SemaOpenMP.cpp:16609
clang::Sema::SpecialMemberOverloadResult::setMethod
void setMethod(CXXMethodDecl *MD)
Definition: Sema.h:1563
clang::Sema::PCC_ParenthesizedExpression
@ PCC_ParenthesizedExpression
Code completion occurs in a parenthesized expression, which might also be a type cast.
Definition: Sema.h:12994
clang::Sema::ActOnStartFunctionDeclarationDeclarator
void ActOnStartFunctionDeclarationDeclarator(Declarator &D, unsigned TemplateParameterDepth)
Called before parsing a function declarator belonging to a function declaration.
Definition: SemaDeclCXX.cpp:18344
clang::Sema::ActOnOpenMPNontemporalClause
OMPClause * ActOnOpenMPNontemporalClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'nontemporal' clause.
Definition: SemaOpenMP.cpp:22494
clang::Sema::AddParameterABIAttr
void AddParameterABIAttr(Decl *D, const AttributeCommonInfo &CI, ParameterABI ABI)
PrettyPrinter.h
clang::Sema::getCachedCoroNamespace
NamespaceDecl * getCachedCoroNamespace()
Definition: Sema.h:6055
clang::Sema::ExpressionEvaluationContextRecord::Lambdas
SmallVector< LambdaExpr *, 2 > Lambdas
The lambdas that are present within this context, if it is indeed an unevaluated context.
Definition: Sema.h:1451
ExprConcepts.h
clang::Sema::CodeSynthesisContext::ConstraintSubstitution
@ ConstraintSubstitution
Definition: Sema.h:9120
clang::Sema::BuildBuiltinOffsetOf
ExprResult BuildBuiltinOffsetOf(SourceLocation BuiltinLoc, TypeSourceInfo *TInfo, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc)
__builtin_offsetof(type, a.b[123][456].c)
Definition: SemaExpr.cpp:15658
clang::Sema::BuildOverloadedCallExpr
ExprResult BuildOverloadedCallExpr(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, SourceLocation LParenLoc, MultiExprArg Args, SourceLocation RParenLoc, Expr *ExecConfig, bool AllowTypoCorrection=true, bool CalleesAddressIsTaken=false)
BuildOverloadedCallExpr - Given the call expression that calls Fn (which eventually refers to the dec...
Definition: SemaOverload.cpp:13272
clang::Sema::DiagnoseSwiftName
bool DiagnoseSwiftName(Decl *D, StringRef Name, SourceLocation Loc, const ParsedAttr &AL, bool IsAsync)
Do a check to make sure Name looks like a legal argument for the swift_name attribute applied to decl...
clang::dataflow::Literal
uint32_t Literal
Literals are represented as positive integers.
Definition: WatchedLiteralsSolver.cpp:55
clang::Sema::checkNSReturnsRetainedReturnType
bool checkNSReturnsRetainedReturnType(SourceLocation loc, QualType type)
clang::Sema::DefaultedComparisonKind::Equal
@ Equal
This is an operator== that should be implemented as a series of subobject comparisons.
clang::Sema::AddAssumeAlignedAttr
void AddAssumeAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, Expr *OE)
AddAssumeAlignedAttr - Adds an assume_aligned attribute to a particular declaration.
clang::Sema::ActOnFinishFunctionBody
Decl * ActOnFinishFunctionBody(Decl *Decl, Stmt *Body)
Definition: SemaDecl.cpp:14674
clang::Sema::ActOnBlockArguments
void ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo, Scope *CurScope)
ActOnBlockArguments - This callback allows processing of block arguments.
Definition: SemaExpr.cpp:15908
clang::StructuralEquivalenceKind::Default
@ Default
APSInt
llvm::APSInt APSInt
Definition: ByteCodeEmitter.cpp:19
clang::Sema::getSuperIdentifier
IdentifierInfo * getSuperIdentifier() const
Definition: Sema.cpp:2718
clang::CXXCastPath
SmallVector< CXXBaseSpecifier *, 4 > CXXCastPath
A simple array of base specifiers.
Definition: Expr.h:57
clang::Sema::getCurLexicalContext
DeclContext * getCurLexicalContext() const
Definition: Sema.h:13513
clang::Sema::CTAK_DeducedFromArrayBound
@ CTAK_DeducedFromArrayBound
The template argument was deduced from an array bound via template argument deduction.
Definition: Sema.h:8195
clang::Sema::LookupTagName
@ LookupTagName
Tag name lookup, which finds the names of enums, classes, structs, and unions.
Definition: Sema.h:4308
clang::Sema::ADLCallKind
CallExpr::ADLCallKind ADLCallKind
Definition: Sema.h:3984
clang::Sema::CodeCompleteObjCAtDirective
void CodeCompleteObjCAtDirective(Scope *S)
Definition: SemaCodeComplete.cpp:7040
clang::Sema::IsComplexPromotion
bool IsComplexPromotion(QualType FromType, QualType ToType)
Determine if a conversion is a complex promotion.
Definition: SemaOverload.cpp:2275
clang::Sema::getVariadicCallType
VariadicCallType getVariadicCallType(FunctionDecl *FDecl, const FunctionProtoType *Proto, Expr *Fn)
Definition: SemaExpr.cpp:5930
clang::Sema::VarArgKind
VarArgKind
Definition: Sema.h:12038
clang::Sema::ImmediateInvocationCandidate
llvm::PointerIntPair< ConstantExpr *, 1 > ImmediateInvocationCandidate
Definition: Sema.h:1428
clang::Sema::PragmaStack::Slot::Value
ValueType Value
Definition: Sema.h:770
clang::Sema::CodeCompleteUsing
void CodeCompleteUsing(Scope *S)
Definition: SemaCodeComplete.cpp:6546
clang::Sema::ActOnArraySubscriptExpr
ExprResult ActOnArraySubscriptExpr(Scope *S, Expr *Base, SourceLocation LLoc, MultiExprArg ArgExprs, SourceLocation RLoc)
Definition: SemaExpr.cpp:4851
clang::OpenMPLastprivateModifier
OpenMPLastprivateModifier
OpenMP 'lastprivate' clause modifier.
Definition: OpenMPKinds.h:143
clang::Sema::BuildVarTemplateInstantiation
VarTemplateSpecializationDecl * BuildVarTemplateInstantiation(VarTemplateDecl *VarTemplate, VarDecl *FromVar, const TemplateArgumentList &TemplateArgList, const TemplateArgumentListInfo &TemplateArgsInfo, SmallVectorImpl< TemplateArgument > &Converted, SourceLocation PointOfInstantiation, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *StartingScope=nullptr)
Definition: SemaTemplateInstantiateDecl.cpp:5480
clang::Sema::SimplerImplicitMoveMode
SimplerImplicitMoveMode
Definition: Sema.h:5160
clang::Sema::FRS_Success
@ FRS_Success
Definition: Sema.h:4187
clang::Sema::getCurFunctionDecl
FunctionDecl * getCurFunctionDecl(bool AllowLambda=false)
Returns a pointer to the innermost enclosing function, or nullptr if the current context is not insid...
Definition: Sema.cpp:1493
clang::Sema::NTK_Typedef
@ NTK_Typedef
Definition: Sema.h:3360
clang::OpenMPBindClauseKind
OpenMPBindClauseKind
OpenMP bindings for the 'bind' clause.
Definition: OpenMPKinds.h:178
clang::Sema::PoppedFunctionScopeDeleter::PoppedFunctionScopeDeleter
PoppedFunctionScopeDeleter(Sema *Self)
Definition: Sema.h:2151
clang::Sema::ImplicitExceptionSpecification::ImplicitExceptionSpecification
ImplicitExceptionSpecification(Sema &Self)
Definition: Sema.h:6253
clang::Sema::CheckForFunctionRedefinition
void CheckForFunctionRedefinition(FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr, SkipBodyInfo *SkipBody=nullptr)
Definition: SemaDecl.cpp:14333
clang::Sema::CheckBitwiseOperands
QualType CheckBitwiseOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
Definition: SemaExpr.cpp:13004
clang::Sema::ConditionResult::ConditionResult
ConditionResult()
Definition: Sema.h:12547
clang::Sema::ActOnTag
Decl * ActOnTag(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, AccessSpecifier AS, SourceLocation ModulePrivateLoc, MultiTemplateParamsArg TemplateParameterLists, bool &OwnedDecl, bool &IsDependent, SourceLocation ScopedEnumKWLoc, bool ScopedEnumUsesClassTag, TypeResult UnderlyingType, bool IsTypeSpecifier, bool IsTemplateParamOrArg, SkipBodyInfo *SkipBody=nullptr)
This is invoked when we see 'struct foo' or 'struct {'.
Definition: SemaDecl.cpp:15836
clang::Sema::LookupMemberName
@ LookupMemberName
Member name lookup, which finds the names of class/struct/union members.
Definition: Sema.h:4313
clang::Sema::ActOnTagDefinitionError
void ActOnTagDefinitionError(Scope *S, Decl *TagDecl)
ActOnTagDefinitionError - Invoked when there was an unrecoverable error parsing the definition of a t...
Definition: SemaDecl.cpp:16919
clang::Sema::SubstTemplateName
TemplateName SubstTemplateName(NestedNameSpecifierLoc QualifierLoc, TemplateName Name, SourceLocation Loc, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:3622
clang::Sema::addAMDGPUFlatWorkGroupSizeAttr
void addAMDGPUFlatWorkGroupSizeAttr(Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
addAMDGPUFlatWorkGroupSizeAttr - Adds an amdgpu_flat_work_group_size attribute to a particular declar...
clang::Sema::CodeCompleteIncludedFile
void CodeCompleteIncludedFile(llvm::StringRef Dir, bool IsAngled)
Definition: SemaCodeComplete.cpp:9849
clang::Sema::DelayedDiagnostics::push
DelayedDiagnosticsState push(sema::DelayedDiagnosticPool &pool)
Enter a new scope.
Definition: Sema.h:1125
clang::Sema::CodeSynthesisContext::TemplateArgs
const TemplateArgument * TemplateArgs
The list of template arguments we are substituting, if they are not part of the entity.
Definition: Sema.h:9161
clang::FunctionTemplateDecl
Declaration of a template function.
Definition: DeclTemplate.h:979
clang::Sema::RequireCompleteType
bool RequireCompleteType(SourceLocation Loc, QualType T, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
Ensure that the type T is a complete type.
Definition: SemaType.cpp:8601
clang::Sema::StringWithUTF8StringMethod
ObjCMethodDecl * StringWithUTF8StringMethod
The declaration of the stringWithUTF8String: method.
Definition: Sema.h:1349
clang::Sema::ContextualImplicitConverter::diagnoseExplicitConv
virtual SemaDiagnosticBuilder diagnoseExplicitConv(Sema &S, SourceLocation Loc, QualType T, QualType ConvTy)=0
Emits a diagnostic when the only matching conversion function is explicit.
clang::Sema::ActOnModuleDecl
DeclGroupPtrTy ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, ModuleDeclKind MDK, ModuleIdPath Path, ModuleIdPath Partition, ModuleImportState &ImportState)
The parser has processed a module-declaration that begins the definition of a module interface or imp...
Definition: SemaModule.cpp:133
clang::LazyOffsetPtr< Decl, uint32_t, &ExternalASTSource::GetExternalDecl >
clang::Sema::CheckTollFreeBridgeStaticCast
bool CheckTollFreeBridgeStaticCast(QualType castType, Expr *castExpr, CastKind &Kind)
Definition: SemaExprObjC.cpp:4208
llvm::MutableArrayRef< ImplicitConversionSequence >
clang::Sema::ActOnOpenMPUseDeviceAddrClause
OMPClause * ActOnOpenMPUseDeviceAddrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'use_device_addr' clause.
Definition: SemaOpenMP.cpp:22296
clang::Sema::CXXDestructor
@ CXXDestructor
Definition: Sema.h:1675
clang::Sema::SFINAETrap::~SFINAETrap
~SFINAETrap()
Definition: Sema.h:9544
clang::Sema::NSArrayDecl
ObjCInterfaceDecl * NSArrayDecl
The declaration of the Objective-C NSArray class.
Definition: Sema.h:1355
clang::Sema::CheckDerivedToBaseConversion
bool CheckDerivedToBaseConversion(QualType Derived, QualType Base, SourceLocation Loc, SourceRange Range, CXXCastPath *BasePath=nullptr, bool IgnoreAccess=false)
Definition: SemaDeclCXX.cpp:3001
clang::Sema::ExpressionEvaluationContextRecord::ImmediateInvocationCandidates
llvm::SmallVector< ImmediateInvocationCandidate, 4 > ImmediateInvocationCandidates
Set of candidates for starting an immediate invocation.
Definition: Sema.h:1474
clang::Sema::DiagnoseInvalidJumps
void DiagnoseInvalidJumps(Stmt *Body)
Definition: JumpDiagnostics.cpp:1018
clang::Sema::DiagnoseMissingDesignatedInitOverrides
void DiagnoseMissingDesignatedInitOverrides(const ObjCImplementationDecl *ImplD, const ObjCInterfaceDecl *IFD)
Definition: SemaObjCProperty.cpp:2319
clang::Sema::SemaDiagnosticBuilder::StmtError
friend StmtResult StmtError(const SemaDiagnosticBuilder &)
Definition: Sema.h:2026
clang::Sema::CreateOverloadedArraySubscriptExpr
ExprResult CreateOverloadedArraySubscriptExpr(SourceLocation LLoc, SourceLocation RLoc, Expr *Base, MultiExprArg Args)
Definition: SemaOverload.cpp:14133
clang::Sema::copySYCLKernelAttrs
void copySYCLKernelAttrs(const CXXRecordDecl *KernelObj)
Definition: SemaSYCL.cpp:3566
clang::Sema::LookupVisibleDecls
void LookupVisibleDecls(Scope *S, LookupNameKind Kind, VisibleDeclConsumer &Consumer, bool IncludeGlobalScope=true, bool LoadExternal=true)
Definition: SemaLookup.cpp:4153
clang::Sema::CheckRemainderOperands
QualType CheckRemainderOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign=false)
Definition: SemaExpr.cpp:10764
clang::Sema::TAH_IgnoreTrivialABI
@ TAH_IgnoreTrivialABI
The triviality of a method unaffected by "trivial_abi".
Definition: Sema.h:3439
clang::Sema::CheckVecStepExpr
bool CheckVecStepExpr(Expr *E)
Definition: SemaExpr.cpp:4508
clang::Sema::ActOnOpenMPOrderClause
OMPClause * ActOnOpenMPOrderClause(OpenMPOrderClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'order' clause.
Definition: SemaOpenMP.cpp:16081
clang::Sema::ActOnLambdaError
void ActOnLambdaError(SourceLocation StartLoc, Scope *CurScope, bool IsInstantiation=false)
ActOnLambdaError - If there is an error parsing a lambda, this callback is invoked to pop the informa...
Definition: SemaLambda.cpp:1251
V
#define V(N, I)
Definition: ASTContext.h:3167
clang::Sema::BuildAnonymousStructUnionMemberReference
ExprResult BuildAnonymousStructUnionMemberReference(const CXXScopeSpec &SS, SourceLocation nameLoc, IndirectFieldDecl *indirectField, DeclAccessPair FoundDecl=DeclAccessPair::make(nullptr, AS_none), Expr *baseObjectExpr=nullptr, SourceLocation opLoc=SourceLocation())
Definition: SemaExprMember.cpp:802
clang::Sema::tryExprAsCall
bool tryExprAsCall(Expr &E, QualType &ZeroArgCallReturnTy, UnresolvedSetImpl &NonTemplateOverloads)
Figure out if an expression could be turned into a call.
Definition: Sema.cpp:2493
clang::Sema::ModuleImportState::ImportFinished
@ ImportFinished
after any non-import decl.
clang::Sema::NC_OverloadSet
@ NC_OverloadSet
The name was classified as an overload set, and an expression representing that overload set has been...
Definition: Sema.h:2749
clang::Sema::AddIntelFPGAMaxReplicatesAttr
void AddIntelFPGAMaxReplicatesAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::BuildSYCLUniqueStableIdExpr
ExprResult BuildSYCLUniqueStableIdExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, Expr *E)
Definition: SemaExpr.cpp:3605
clang::Sema::ActOnNestedRequirement
concepts::Requirement * ActOnNestedRequirement(Expr *Constraint)
Definition: SemaExprCXX.cpp:8902
clang::Sema::VariadicFunction
@ VariadicFunction
Definition: Sema.h:12025
clang::Sema::ActOnOpenMPSIMDClause
OMPClause * ActOnOpenMPSIMDClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'simd' clause.
Definition: SemaOpenMP.cpp:16619
clang::Sema::TypeDiagnoser::TypeDiagnoser
TypeDiagnoser()
Definition: Sema.h:2371
clang::Sema::BuildParenType
QualType BuildParenType(QualType T)
Build a paren type including T.
Definition: SemaType.cpp:1996
clang::ast_matchers::expr
const internal::VariadicDynCastAllOfMatcher< Stmt, Expr > expr
Matches expressions.
Definition: ASTMatchersInternal.cpp:890
clang::Sema::NonInstantiationEntries
unsigned NonInstantiationEntries
The number of CodeSynthesisContexts that are not template instantiations and, therefore,...
Definition: Sema.h:9243
clang::Sema::BuildCXXDefaultArgExpr
ExprResult BuildCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
BuildCXXDefaultArgExpr - Creates a CXXDefaultArgExpr, instantiating the default expr if needed.
Definition: SemaExpr.cpp:5921
clang::Sema::ActOnOpenMPBeginDeclareVariant
void ActOnOpenMPBeginDeclareVariant(SourceLocation Loc, OMPTraitInfo &TI)
Handle a omp begin declare variant.
Definition: SemaOpenMP.cpp:2483
clang::Sema::MergeSYCLUsesAspectsAttr
SYCLUsesAspectsAttr * MergeSYCLUsesAspectsAttr(Decl *D, const SYCLUsesAspectsAttr &A)
clang::SYCLIntegrationHeader::kind_first
@ kind_first
Definition: Sema.h:315
clang::Sema::getShadowedDeclaration
NamedDecl * getShadowedDeclaration(const TypedefNameDecl *D, const LookupResult &R)
Return the declaration shadowed by the given typedef D, or null if it doesn't shadow any declaration ...
Definition: SemaDecl.cpp:7831
clang::Sema::NestedNameSpecInfo::IdentifierLoc
SourceLocation IdentifierLoc
The location of the identifier.
Definition: Sema.h:6888
clang::ast_matchers::attr
const internal::VariadicAllOfMatcher< Attr > attr
Matches attributes.
Definition: ASTMatchersInternal.cpp:1030
clang::ParameterABI
ParameterABI
Kinds of parameter ABI.
Definition: Specifiers.h:343
clang::Sema::LookupMethodInQualifiedType
ObjCMethodDecl * LookupMethodInQualifiedType(Selector Sel, const ObjCObjectPointerType *OPT, bool IsInstance)
LookupMethodInQualifiedType - Lookups up a method in protocol qualifier list of a qualified objective...
Definition: SemaExprObjC.cpp:1960
clang::Sema::getEnclosingLambda
sema::LambdaScopeInfo * getEnclosingLambda() const
Get the innermost lambda enclosing the current location, if any.
Definition: Sema.cpp:2389
clang::Sema::ActOnObjCAtCatchStmt
StmtResult ActOnObjCAtCatchStmt(SourceLocation AtLoc, SourceLocation RParen, Decl *Parm, Stmt *Body)
Definition: SemaStmt.cpp:4198
clang::Sema::BuildCXXNew
ExprResult BuildCXXNew(SourceRange Range, bool UseGlobal, SourceLocation PlacementLParen, MultiExprArg PlacementArgs, SourceLocation PlacementRParen, SourceRange TypeIdParens, QualType AllocType, TypeSourceInfo *AllocTypeInfo, Optional< Expr * > ArraySize, SourceRange DirectInitRange, Expr *Initializer)
Definition: SemaExprCXX.cpp:1956
clang::Sema::RebuildExprInCurrentInstantiation
ExprResult RebuildExprInCurrentInstantiation(Expr *E)
Definition: SemaTemplate.cpp:10832
clang::Sema::isPreciseFPEnabled
bool isPreciseFPEnabled()
Are precise floating point semantics currently enabled?
Definition: Sema.h:10438
clang::Sema::BuildIvarRefExpr
ExprResult BuildIvarRefExpr(Scope *S, SourceLocation Loc, ObjCIvarDecl *IV)
Definition: SemaExpr.cpp:2906
clang::Sema::getTemplateInstantiationArgs
MultiLevelTemplateArgumentList getTemplateInstantiationArgs(const NamedDecl *D, const TemplateArgumentList *Innermost=nullptr, bool RelativeToPrimary=false, const FunctionDecl *Pattern=nullptr)
Retrieve the template argument list(s) that should be used to instantiate the definition of the given...
Definition: SemaTemplateInstantiate.cpp:58
clang::Sema::isQualifiedMemberAccess
bool isQualifiedMemberAccess(Expr *E)
Determine whether the given expression is a qualified member access expression, of a form that could ...
Definition: SemaExpr.cpp:15476
clang::Sema::ExpressionEvaluationContext::UnevaluatedList
@ UnevaluatedList
The current expression occurs within a braced-init-list within an unevaluated operand.
clang::Sema::CodeSynthesisContext::Template
NamedDecl * Template
The template (or partial specialization) in which we are performing the instantiation,...
Definition: Sema.h:9157
clang::Sema::DelayedOverridingExceptionSpecChecks
SmallVector< std::pair< const CXXMethodDecl *, const CXXMethodDecl * >, 2 > DelayedOverridingExceptionSpecChecks
All the overriding functions seen during a class definition that had their exception spec checks dela...
Definition: Sema.h:1063
clang::Sema::ActOnOpenMPVarListClause
OMPClause * ActOnOpenMPVarListClause(OpenMPClauseKind Kind, ArrayRef< Expr * > Vars, Expr *DepModOrTailExpr, const OMPVarListLocTy &Locs, SourceLocation ColonLoc, CXXScopeSpec &ReductionOrMapperIdScopeSpec, DeclarationNameInfo &ReductionOrMapperId, int ExtraModifier, ArrayRef< OpenMPMapModifierKind > MapTypeModifiers, ArrayRef< SourceLocation > MapTypeModifiersLoc, bool IsMapTypeImplicit, SourceLocation ExtraModifierLoc, ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc)
Definition: SemaOpenMP.cpp:16915
clang::Sema::AttributeCompletion
AttributeCompletion
Definition: Sema.h:13024
clang::Sema::CheckVarTemplateId
DeclResult CheckVarTemplateId(VarTemplateDecl *Template, SourceLocation TemplateLoc, SourceLocation TemplateNameLoc, const TemplateArgumentListInfo &TemplateArgs)
Get the specialization of the given variable template corresponding to the specified argument list,...
Definition: SemaTemplate.cpp:4496
clang::Sema::ValueWithBytesObjCTypeMethod
ObjCMethodDecl * ValueWithBytesObjCTypeMethod
The declaration of the valueWithBytes:objCType: method.
Definition: Sema.h:1352
clang::Sema::ShouldEnterDeclaratorScope
bool ShouldEnterDeclaratorScope(Scope *S, const CXXScopeSpec &SS)
Definition: SemaCXXScopeSpec.cpp:1039
clang::Sema::RequiredTemplateKind::hasTemplateKeyword
bool hasTemplateKeyword() const
Definition: Sema.h:7864
clang::Sema::ActOnObjCAvailabilityCheckExpr
ExprResult ActOnObjCAvailabilityCheckExpr(llvm::ArrayRef< AvailabilitySpec > AvailSpecs, SourceLocation AtLoc, SourceLocation RParen)
Definition: SemaExpr.cpp:20354
clang::Sema::CodeCompleteNamespaceAliasDecl
void CodeCompleteNamespaceAliasDecl(Scope *S)
Definition: SemaCodeComplete.cpp:6644
clang::Sema::FindCompositePointerType
QualType FindCompositePointerType(SourceLocation Loc, Expr *&E1, Expr *&E2, bool ConvertArgs=true)
Find a merged pointer type and convert the two expressions to it.
Definition: SemaExprCXX.cpp:6614
clang::Sema::getPrintable
static SourceRange getPrintable(SourceRange R)
Definition: Sema.h:2388
clang::Sema::ActOnOpenMPSingleExprClause
OMPClause * ActOnOpenMPSingleExprClause(OpenMPClauseKind Kind, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:14518
clang::PragmaFloatControlKind
PragmaFloatControlKind
Definition: PragmaKinds.h:28
clang::RecordType
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...
Definition: Type.h:4649
clang::MangleContext
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangl...
Definition: Mangle.h:44
clang::Sema::AttachBaseSpecifiers
bool AttachBaseSpecifiers(CXXRecordDecl *Class, MutableArrayRef< CXXBaseSpecifier * > Bases)
Performs the actual work of attaching the given base class specifiers to a C++ class.
Definition: SemaDeclCXX.cpp:2716
clang::Sema::BuildCXXTypeConstructExpr
ExprResult BuildCXXTypeConstructExpr(TypeSourceInfo *Type, SourceLocation LParenLoc, MultiExprArg Exprs, SourceLocation RParenLoc, bool ListInitialization)
Definition: SemaExprCXX.cpp:1447
clang::Sema::CTAK_Specified
@ CTAK_Specified
The template argument was specified in the code or was instantiated with some deduced template argume...
Definition: Sema.h:8187
clang::Sema::CodeSynthesisContext::ExceptionSpecInstantiation
@ ExceptionSpecInstantiation
We are instantiating the exception specification for a function template which was deferred until it ...
Definition: Sema.h:9093
clang::Sema::computeNRVO
void computeNRVO(Stmt *Body, sema::FunctionScopeInfo *Scope)
Given the set of return statements within a function body, compute the variables that are subject to ...
Definition: SemaDecl.cpp:14611
clang::PreferredTypeBuilder::enterFunctionArgument
void enterFunctionArgument(SourceLocation Tok, llvm::function_ref< QualType()> ComputeType)
Computing a type for the function argument may require running overloading, so we postpone its comput...
Definition: SemaCodeComplete.cpp:427
clang::Sema::BuildCXXNamedCast
ExprResult BuildCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, TypeSourceInfo *Ty, Expr *E, SourceRange AngleBrackets, SourceRange Parens)
Definition: SemaCast.cpp:297
clang::Sema::BuildSYCLIntelFPGAIVDepAttr
SYCLIntelFPGAIVDepAttr * BuildSYCLIntelFPGAIVDepAttr(const AttributeCommonInfo &CI, Expr *Expr1, Expr *Expr2)
Definition: SemaStmtAttr.cpp:270
clang::Sema::CheckOverload
OverloadKind CheckOverload(Scope *S, FunctionDecl *New, const LookupResult &OldDecls, NamedDecl *&OldDecl, bool IsForUsingDecl)
Determine whether the given New declaration is an overload of the declarations in Old.
Definition: SemaOverload.cpp:1029
clang::Sema::ActOnOpenMPCompareClause
OMPClause * ActOnOpenMPCompareClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'compare' clause.
Definition: SemaOpenMP.cpp:16584
clang::Sema::SaveNestedNameSpecifierAnnotation
void * SaveNestedNameSpecifierAnnotation(CXXScopeSpec &SS)
Given a C++ nested-name-specifier, produce an annotation value that the parser can use later to recon...
Definition: SemaCXXScopeSpec.cpp:1012
clang::Module
Describes a module or submodule.
Definition: Module.h:96
clang::Sema::ActOnGotoStmt
StmtResult ActOnGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc, LabelDecl *TheDecl)
Definition: SemaStmt.cpp:3265
clang::Sema::VariadicDoesNotApply
@ VariadicDoesNotApply
Definition: Sema.h:12029
clang::Sema::DeclareTargetContextInfo::MapInfo::MT
OMPDeclareTargetDeclAttr::MapTypeTy MT
Definition: Sema.h:10774
clang::Sema::CheckOpenMPLinearModifier
bool CheckOpenMPLinearModifier(OpenMPLinearClauseKind LinKind, SourceLocation LinLoc)
Checks correctness of linear modifiers.
Definition: SemaOpenMP.cpp:19002
clang::Sema::CurFPFeatures
FPOptions CurFPFeatures
Definition: Sema.h:583
clang::Sema::ActOnNameClassifiedAsUndeclaredNonType
ExprResult ActOnNameClassifiedAsUndeclaredNonType(IdentifierInfo *Name, SourceLocation NameLoc)
Act on the result of classifying a name as an undeclared (ADL-only) non-type declaration.
Definition: SemaDecl.cpp:1225
DeclTemplate.h
clang::Sema::CodeCompleteFunctionQualifiers
void CodeCompleteFunctionQualifiers(DeclSpec &DS, Declarator &D, const VirtSpecifiers *VS=nullptr)
Definition: SemaCodeComplete.cpp:5812
clang::Sema::ObjCContainerKind
ObjCContainerKind
Definition: Sema.h:9942
clang::Sema::inTemplateInstantiation
bool inTemplateInstantiation() const
Determine whether we are currently performing template instantiation.
Definition: Sema.h:9479
clang::Sema::SkipBodyInfo::New
NamedDecl * New
Definition: Sema.h:2687
clang::Sema::ActOnCapturedRegionError
void ActOnCapturedRegionError()
Definition: SemaStmt.cpp:4801
clang::Sema::SpecialMemberOverloadResult::SpecialMemberOverloadResult
SpecialMemberOverloadResult()
Definition: Sema.h:1558
clang::FileNullabilityMap::operator[]
FileNullability & operator[](FileID file)
Definition: Sema.h:275
clang::OpenMPLinearClauseKind
OpenMPLinearClauseKind
OpenMP attributes for 'linear' clause.
Definition: OpenMPKinds.h:62
clang::PreferredTypeBuilder::enterVariableInit
void enterVariableInit(SourceLocation Tok, Decl *D)
Definition: SemaCodeComplete.cpp:406
clang::Sema::ActOnOpenMPPartialClause
OMPClause * ActOnOpenMPPartialClause(Expr *FactorExpr, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-form 'partial' clauses.
Definition: SemaOpenMP.cpp:16141
clang::Sema::SkipBodyInfo::ShouldSkip
bool ShouldSkip
Definition: Sema.h:2684
clang::Sema::OS_Dictionary
@ OS_Dictionary
Definition: Sema.h:3956
clang::Sema::MakeFullExpr
FullExprArg MakeFullExpr(Expr *Arg, SourceLocation CC)
Definition: Sema.h:4990
clang::Sema::ActOnClassPropertyRefExpr
ExprResult ActOnClassPropertyRefExpr(IdentifierInfo &receiverName, IdentifierInfo &propertyName, SourceLocation receiverNameLoc, SourceLocation propertyNameLoc)
Definition: SemaExprObjC.cpp:2159
clang::Sema::KernelCallRecursiveFunction
@ KernelCallRecursiveFunction
Definition: Sema.h:13685
clang::interp::Opcode
Opcode
Definition: Opcode.h:21
clang::Sema::UPPC_Block
@ UPPC_Block
Block expression.
Definition: Sema.h:8498
clang::Sema::ActOnOpenMPScheduleClause
OMPClause * ActOnOpenMPScheduleClause(OpenMPScheduleClauseModifier M1, OpenMPScheduleClauseModifier M2, OpenMPScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation M1Loc, SourceLocation M2Loc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
Called on well-formed 'schedule' clause.
Definition: SemaOpenMP.cpp:16316
clang::UnresolvedLookupExpr
A reference to a name which we were able to look up during parsing but could not resolve to a specifi...
Definition: ExprCXX.h:3090
clang::Sema::TPC_TypeAliasTemplate
@ TPC_TypeAliasTemplate
Definition: Sema.h:8005
clang::Sema::EmitRelatedResultTypeNoteForReturn
void EmitRelatedResultTypeNoteForReturn(QualType destType)
Given that we had incompatible pointer types in a return statement, check whether we're in a method w...
Definition: SemaExprObjC.cpp:1657
clang::Sema::CheckVirtualDtorCall
void CheckVirtualDtorCall(CXXDestructorDecl *dtor, SourceLocation Loc, bool IsDelete, bool CallCanBeVirtual, bool WarnOnNonAbstractTypes, SourceLocation DtorLoc)
Definition: SemaExprCXX.cpp:3867
clang::Sema::PSK_Reset
@ PSK_Reset
Definition: Sema.h:655
clang::Sema::CodeSynthesisContext::isInstantiationRecord
bool isInstantiationRecord() const
Determines whether this template is an actual instantiation that should be counted toward the maximum...
Definition: SemaTemplateInstantiate.cpp:191
clang::Sema::ActOnOpenMPTeamsDistributeDirective
StmtResult ActOnOpenMPTeamsDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13517
clang::Sema::ActOnTagFinishDefinition
void ActOnTagFinishDefinition(Scope *S, Decl *TagDecl, SourceRange BraceRange)
ActOnTagFinishDefinition - Invoked once we have finished parsing the definition of a tag (enumeration...
Definition: SemaDecl.cpp:16844
clang::RequiresExprBodyDecl
Represents the body of a requires-expression.
Definition: DeclCXX.h:1946
clang::Sema::CodeCompleteQualifiedId
void CodeCompleteQualifiedId(Scope *S, CXXScopeSpec &SS, bool EnteringContext, bool IsUsingDeclaration, QualType BaseType, QualType PreferredType)
Definition: SemaCodeComplete.cpp:6453
clang::PartialDiagnosticAt
std::pair< SourceLocation, PartialDiagnostic > PartialDiagnosticAt
A partial diagnostic along with the source location where this diagnostic occurs.
Definition: PartialDiagnostic.h:205
clang::Sema::TentativeDefinitions
TentativeDefinitionsType TentativeDefinitions
All the tentative definitions encountered in the TU.
Definition: Sema.h:1038
clang::Sema::getDiagnostics
DiagnosticsEngine & getDiagnostics() const
Definition: Sema.h:1778
clang::Sema::ActOnStartSEHFinallyBlock
void ActOnStartSEHFinallyBlock()
Definition: SemaStmt.cpp:4597
clang::Sema::UPPC_Initializer
@ UPPC_Initializer
An initializer.
Definition: Sema.h:8474
clang::Sema::CodeCompletePreprocessorDirective
void CodeCompletePreprocessorDirective(bool InConditional)
Definition: SemaCodeComplete.cpp:9609
clang::TemplateArgumentListInfo
A convenient class for passing around template argument information.
Definition: TemplateBase.h:563
clang::Sema::CoroTraitsNamespaceCache
NamespaceDecl * CoroTraitsNamespaceCache
The namespace where coroutine components are defined.
Definition: Sema.h:1316
clang::Sema::MarkAnyDeclReferenced
void MarkAnyDeclReferenced(SourceLocation Loc, Decl *D, bool MightBeOdrUse)
Perform marking for a reference to an arbitrary declaration.
Definition: SemaExpr.cpp:19279
clang::Sema::ArgumentPackSubstitutionIndexRAII
RAII object used to change the argument pack substitution index within a Sema object.
Definition: Sema.h:9273
clang::Sema::PragmaStackSentinelRAII
Definition: Sema.h:886
clang::Sema::MaybeAddCUDAConstantAttr
void MaybeAddCUDAConstantAttr(VarDecl *VD)
May add implicit CUDAConstantAttr attribute to VD, depending on VD and current compilation settings.
Definition: SemaCUDA.cpp:714
StmtOpenMP.h
clang::DeclAccessPair::make
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
Definition: DeclAccessPair.h:35
clang::Sema::ActOnObjCBridgedCast
ExprResult ActOnObjCBridgedCast(Scope *S, SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, ParsedType Type, SourceLocation RParenLoc, Expr *SubExpr)
Definition: SemaExprObjC.cpp:4751
clang::Sema::ContextRAII::ContextRAII
ContextRAII(Sema &S, DeclContext *ContextToPush, bool NewThisContext=true)
Definition: Sema.h:1166
clang::Sema::ACR_okay
@ ACR_okay
Definition: Sema.h:12467
clang::Sema::ActOnCaseStmtBody
void ActOnCaseStmtBody(Stmt *CaseStmt, Stmt *SubStmt)
ActOnCaseStmtBody - This installs a statement as the body of a case.
Definition: SemaStmt.cpp:526
clang::Sema::ActOnTypeName
TypeResult ActOnTypeName(Scope *S, Declarator &D)
Definition: SemaType.cpp:6464
clang::Sema::CurFPFeatureOverrides
FPOptionsOverride CurFPFeatureOverrides()
Definition: Sema.h:874
clang::Sema::startLambdaDefinition
CXXMethodDecl * startLambdaDefinition(CXXRecordDecl *Class, SourceRange IntroducerRange, TypeSourceInfo *MethodType, SourceLocation EndLoc, ArrayRef< ParmVarDecl * > Params, ConstexprSpecKind ConstexprKind, Expr *TrailingRequiresClause)
Start the definition of a lambda expression.
Definition: SemaLambda.cpp:357
clang::Sema::VarsWithInheritedDSAType
llvm::SmallDenseMap< const ValueDecl *, const Expr *, 4 > VarsWithInheritedDSAType
Definition: Sema.h:11150
clang::Sema::DeferDiagsRAII
RAII class to control scope of DeferDiags.
Definition: Sema.h:2067
clang::Sema::UsesAllocatorsData::RParenLoc
SourceLocation RParenLoc
Definition: Sema.h:11933
clang::Sema::ActOnPseudoDestructorExpr
ExprResult ActOnPseudoDestructorExpr(Scope *S, Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, CXXScopeSpec &SS, UnqualifiedId &FirstTypeName, SourceLocation CCLoc, SourceLocation TildeLoc, UnqualifiedId &SecondTypeName)
Definition: SemaExprCXX.cpp:7662
clang::Sema::NameClassification
Definition: Sema.h:2762
clang::Sema::CFT_HostDevice
@ CFT_HostDevice
Definition: Sema.h:12804
clang::TagTypeKind
TagTypeKind
The kind of a tag type.
Definition: Type.h:5386
clang::Sema::ActOnOpenMPDepobjDirective
StmtResult ActOnOpenMPDepobjDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp depobj'.
Definition: SemaOpenMP.cpp:10806
clang::Sema::PCC_Class
@ PCC_Class
Code completion occurs within a class, struct, or union.
Definition: Sema.h:12959
clang::Sema::diagnoseARCUnbridgedCast
void diagnoseARCUnbridgedCast(Expr *e)
Given that we saw an expression with the ARCUnbridgedCastTy placeholder type, complain bitterly.
Definition: SemaExprObjC.cpp:4514
clang::Sema::CheckMatrixCast
bool CheckMatrixCast(SourceRange R, QualType DestTy, QualType SrcTy, CastKind &Kind)
Definition: SemaExpr.cpp:7786
clang::Sema::ActOnOpenMPPriorityClause
OMPClause * ActOnOpenMPPriorityClause(Expr *Priority, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'priority' clause.
Definition: SemaOpenMP.cpp:21636
clang::Sema::ActOnClassTemplateSpecialization
DeclResult ActOnClassTemplateSpecialization(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, SourceLocation ModulePrivateLoc, CXXScopeSpec &SS, TemplateIdAnnotation &TemplateId, const ParsedAttributesView &Attr, MultiTemplateParamsArg TemplateParameterLists, SkipBodyInfo *SkipBody=nullptr)
Definition: SemaTemplate.cpp:8233
clang::Sema::ActOnChooseExpr
ExprResult ActOnChooseExpr(SourceLocation BuiltinLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr, SourceLocation RPLoc)
Definition: SemaExpr.cpp:15840
clang::Sema::ActOnCXXExitDeclaratorScope
void ActOnCXXExitDeclaratorScope(Scope *S, const CXXScopeSpec &SS)
ActOnCXXExitDeclaratorScope - Called when a declarator that previously invoked ActOnCXXEnterDeclarato...
Definition: SemaCXXScopeSpec.cpp:1115
clang::Sema::ActOnOpenMPInitClause
OMPClause * ActOnOpenMPInitClause(Expr *InteropVar, ArrayRef< Expr * > PrefExprs, bool IsTarget, bool IsTargetSync, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'init' clause.
Definition: SemaOpenMP.cpp:16780
clang::Sema::UnusedFileScopedDeclsType
LazyVector< const DeclaratorDecl *, ExternalSemaSource, &ExternalSemaSource::ReadUnusedFileScopedDecls, 2, 2 > UnusedFileScopedDeclsType
Definition: Sema.h:1045
clang::BlockDecl
Represents a block literal declaration, which is like an unnamed FunctionDecl.
Definition: Decl.h:4179
clang::UnexpandedParameterPack
std::pair< llvm::PointerUnion< const TemplateTypeParmType *, NamedDecl * >, SourceLocation > UnexpandedParameterPack
Definition: Sema.h:242
clang::Sema::BuildAnonymousStructOrUnion
Decl * BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS, AccessSpecifier AS, RecordDecl *Record, const PrintingPolicy &Policy)
BuildAnonymousStructOrUnion - Handle the declaration of an anonymous structure or union.
Definition: SemaDecl.cpp:5206
clang::Sema::ActOnCUDAExecConfigExpr
ExprResult ActOnCUDAExecConfigExpr(Scope *S, SourceLocation LLLLoc, MultiExprArg ExecConfig, SourceLocation GGGLoc)
Definition: SemaCUDA.cpp:50
clang::Sema::UpdateExceptionSpec
void UpdateExceptionSpec(FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI)
Definition: SemaExceptionSpec.cpp:242
clang::Sema::ActOnOpenMPToClause
OMPClause * ActOnOpenMPToClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=llvm::None)
Called on well-formed 'to' clause.
Definition: SemaOpenMP.cpp:22137
clang::QualType::getAddressSpace
LangAS getAddressSpace() const
Return the address space of this type.
Definition: Type.h:6623
clang::PreferredTypeBuilder::get
QualType get(SourceLocation Tok) const
Get the expected type associated with this location, if any.
Definition: Sema.h:509
clang::Sema::MergeVarDecl
void MergeVarDecl(VarDecl *New, LookupResult &Previous)
MergeVarDecl - We just parsed a variable 'New' which has the same name and scope as a previous declar...
Definition: SemaDecl.cpp:4247
clang::Sema::EmitRelatedResultTypeNote
void EmitRelatedResultTypeNote(const Expr *E)
If the given expression involves a message send to a method with a related result type,...
Definition: SemaExprObjC.cpp:1686
clang::Sema::CheckMemberAccess
AccessResult CheckMemberAccess(SourceLocation UseLoc, CXXRecordDecl *NamingClass, DeclAccessPair Found)
Checks access to a member.
Definition: SemaAccess.cpp:1734
clang::Sema::ActOnLastBitfield
void ActOnLastBitfield(SourceLocation DeclStart, SmallVectorImpl< Decl * > &AllIvarDecls)
ActOnLastBitfield - This routine handles synthesized bitfields rules for class and class extensions.
Definition: SemaDecl.cpp:17530
clang::Sema::CXXMoveAssignment
@ CXXMoveAssignment
Definition: Sema.h:1674
clang::Sema::ActOnDesignatedInitializer
ExprResult ActOnDesignatedInitializer(Designation &Desig, SourceLocation EqualOrColonLoc, bool GNUSyntax, ExprResult Init)
Definition: SemaInit.cpp:3176
clang::Sema::diagnoseUnavailableAlignedAllocation
void diagnoseUnavailableAlignedAllocation(const FunctionDecl &FD, SourceLocation Loc)
Produce diagnostics if FD is an aligned allocation or deallocation function that is unavailable.
Definition: SemaExprCXX.cpp:1938
clang::Sema::Ref_Incompatible
@ Ref_Incompatible
Ref_Incompatible - The two types are incompatible, so direct reference binding is not possible.
Definition: Sema.h:12392
clang::Sema::CreatePropertyDecl
ObjCPropertyDecl * CreatePropertyDecl(Scope *S, ObjCContainerDecl *CDecl, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, Selector GetterSel, SourceLocation GetterNameLoc, Selector SetterSel, SourceLocation SetterNameLoc, const bool isReadWrite, const unsigned Attributes, const unsigned AttributesAsWritten, QualType T, TypeSourceInfo *TSI, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
Called by ActOnProperty and HandlePropertyInClassExtension to handle creating the ObjcPropertyDecl fo...
Definition: SemaObjCProperty.cpp:558
clang::ExceptionSpecificationType
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
Definition: ExceptionSpecificationType.h:20
clang::Sema::CheckPureMethod
bool CheckPureMethod(CXXMethodDecl *Method, SourceRange InitRange)
Mark the given method pure.
Definition: SemaDeclCXX.cpp:17573
clang::Sema::ActOnFinishDelayedMemberInitializers
void ActOnFinishDelayedMemberInitializers(Decl *Record)
Definition: SemaDeclCXX.cpp:13514
clang::Sema::ActOnBuiltinOffsetOf
ExprResult ActOnBuiltinOffsetOf(Scope *S, SourceLocation BuiltinLoc, SourceLocation TypeLoc, ParsedType ParsedArgTy, ArrayRef< OffsetOfComponent > Components, SourceLocation RParenLoc)
Definition: SemaExpr.cpp:15821
clang::Sema::ACK_BitwiseOp
@ ACK_BitwiseOp
A bitwise operation.
Definition: Sema.h:12088
clang::Sema::canCalleeThrow
static CanThrowResult canCalleeThrow(Sema &S, const Expr *E, const Decl *D, SourceLocation Loc=SourceLocation())
Determine whether the callee of a particular function call can throw.
Definition: SemaExceptionSpec.cpp:1007
clang::Sema::AddImplicitlyDeclaredMembersToClass
void AddImplicitlyDeclaredMembersToClass(CXXRecordDecl *ClassDecl)
AddImplicitlyDeclaredMembersToClass - Adds any implicitly-declared special functions,...
Definition: SemaDeclCXX.cpp:10185
clang::Sema::HandleExprPropertyRefExpr
ExprResult HandleExprPropertyRefExpr(const ObjCObjectPointerType *OPT, Expr *BaseExpr, SourceLocation OpLoc, DeclarationName MemberName, SourceLocation MemberLoc, SourceLocation SuperLoc, QualType SuperType, bool Super)
HandleExprPropertyRefExpr - Handle foo.bar where foo is a pointer to an objective C interface.
Definition: SemaExprObjC.cpp:1976
clang::Sema::RequireCompleteType
bool RequireCompleteType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Definition: Sema.h:2600
clang::Sema::SemaDiagnosticBuilder::~SemaDiagnosticBuilder
~SemaDiagnosticBuilder()
Definition: Sema.cpp:1928
clang::Sema::ActOnFinishNamespaceDef
void ActOnFinishNamespaceDef(Decl *Dcl, SourceLocation RBrace)
ActOnFinishNamespaceDef - This callback is called after a namespace is exited.
Definition: SemaDeclCXX.cpp:11266
clang::OMPClause
This is a basic class for representing single OpenMP clause.
Definition: OpenMPClause.h:55
clang::Sema::ActOnOpenMPMasterTaskLoopDirective
StmtResult ActOnOpenMPMasterTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp master taskloop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13010
clang::DiagnosticBuilder::Clear
void Clear() const
Clear out the current diagnostic.
Definition: Diagnostic.h:1302
clang::Sema::CheckObjCBridgeRelatedConversions
bool CheckObjCBridgeRelatedConversions(SourceLocation Loc, QualType DestType, QualType SrcType, Expr *&SrcExpr, bool Diagnose=true)
Definition: SemaExprObjC.cpp:4299
clang::Sema::SemaDiagnosticBuilder::isImmediate
bool isImmediate() const
Definition: Sema.h:1963
clang::Sema::InstantiateExceptionSpec
void InstantiateExceptionSpec(SourceLocation PointOfInstantiation, FunctionDecl *Function)
Definition: SemaTemplateInstantiateDecl.cpp:4954
clang::Sema::CreateParsedType
ParsedType CreateParsedType(QualType T, TypeSourceInfo *TInfo)
Package the given type and TSI into a ParsedType.
Definition: SemaType.cpp:6445
Id
int Id
Definition: ASTDiff.cpp:191
clang::Sema::CheckObjCBridgeRelatedCast
void CheckObjCBridgeRelatedCast(QualType castType, Expr *castExpr)
Definition: SemaExprObjC.cpp:4187
clang::Sema::ActOnPragmaOptionsAlign
void ActOnPragmaOptionsAlign(PragmaOptionsAlignKind Kind, SourceLocation PragmaLoc)
ActOnPragmaOptionsAlign - Called on well formed #pragma options align.
Definition: SemaAttr.cpp:215
clang::Sema::ForRangeStatus
ForRangeStatus
Definition: Sema.h:4186
clang::FunctionProtoType::ExceptionSpecInfo
Holds information about the various types of exception specification.
Definition: Type.h:3957
clang::Sema::hasUncompilableErrorOccurred
bool hasUncompilableErrorOccurred() const
Whether uncompilable error has occurred.
Definition: Sema.cpp:1621
clang::Sema::CodeCompleteObjCAtVisibility
void CodeCompleteObjCAtVisibility(Scope *S)
Definition: SemaCodeComplete.cpp:7177
clang::format::encoding::Encoding
Encoding
Definition: Encoding.h:27
clang::Sema::CheckTemplateDeclScope
bool CheckTemplateDeclScope(Scope *S, TemplateParameterList *TemplateParams)
Check whether a template can be declared within this scope.
Definition: SemaTemplate.cpp:7926
clang::Sema::CodeCompleteObjCMethodDecl
void CodeCompleteObjCMethodDecl(Scope *S, Optional< bool > IsInstanceMethod, ParsedType ReturnType)
Definition: SemaCodeComplete.cpp:9348
clang::Sema::lookupCoroutineTraits
ClassTemplateDecl * lookupCoroutineTraits(SourceLocation KwLoc, SourceLocation FuncLoc, NamespaceDecl *&Namespace)
Lookup 'coroutine_traits' in std namespace and std::experimental namespace.
Definition: SemaCoroutine.cpp:1682
clang::Sema::CheckVirtualSYCLAddIRAttributesFunctionAttr
void CheckVirtualSYCLAddIRAttributesFunctionAttr(const NamedDecl *D)
CheckVirtualSYCLAddIRAttributesFunctionAttr - Check and diagnose if a SYCLAddIRAttributesFunctionAttr...
Definition: SemaDeclCXX.cpp:3129
clang::Sema::DiagnoseEmptyLoopBody
void DiagnoseEmptyLoopBody(const Stmt *S, const Stmt *PossibleBody)
Warn if a for/while loop statement S, which is followed by PossibleBody, has a suspicious null statem...
Definition: SemaChecking.cpp:16437
clang::MemInitResult
ActionResult< CXXCtorInitializer * > MemInitResult
Definition: Ownership.h:266
clang::ConceptDecl
Declaration of a C++2a concept.
Definition: DeclTemplate.h:3235
clang::Sema::OffsetOfComponent::LocEnd
SourceLocation LocEnd
Definition: Sema.h:5921
clang::Sema::MergeCXXFunctionDecl
bool MergeCXXFunctionDecl(FunctionDecl *New, FunctionDecl *Old, Scope *S)
MergeCXXFunctionDecl - Merge two declarations of the same C++ function, once we already know that the...
Definition: SemaDeclCXX.cpp:448
clang::Sema::UnexpandedParameterPackContext
UnexpandedParameterPackContext
The context in which an unexpanded parameter pack is being diagnosed.
Definition: Sema.h:8439
clang::Sema::ActOnCXXForRangeStmt
StmtResult ActOnCXXForRangeStmt(Scope *S, SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, Stmt *LoopVar, SourceLocation ColonLoc, Expr *Collection, SourceLocation RParenLoc, BuildForRangeKind Kind)
ActOnCXXForRangeStmt - Check and build a C++11 for-range statement.
Definition: SemaStmt.cpp:2465
clang::Scope
Scope - A scope is a transient data structure that is used while parsing the program.
Definition: Scope.h:40
clang::Sema::ContextualImplicitConverter::noteExplicitConv
virtual SemaDiagnosticBuilder noteExplicitConv(Sema &S, CXXConversionDecl *Conv, QualType ConvTy)=0
Emits a note for the explicit conversion function.
clang::Sema::IsAtLeastAsConstrained
bool IsAtLeastAsConstrained(NamedDecl *D1, ArrayRef< const Expr * > AC1, NamedDecl *D2, ArrayRef< const Expr * > AC2, bool &Result)
Check whether the given declaration's associated constraints are at least as constrained than another...
Definition: SemaConcept.cpp:973
clang::Sema::EnterDeclaratorContext
void EnterDeclaratorContext(Scope *S, DeclContext *DC)
EnterDeclaratorContext - Used when we must lookup names in the context of a declarator's nested name ...
Definition: SemaDecl.cpp:1340
clang::Sema::TypoCorrectedFunctionDefinitions
llvm::SmallPtrSet< const NamedDecl *, 4 > TypoCorrectedFunctionDefinitions
The function definitions which were renamed as part of typo-correction to match their respective decl...
Definition: Sema.h:1709
clang::Sema::DefaultedFunctionKind::isComparison
bool isComparison() const
Definition: Sema.h:3464
clang::Sema::ICEConvertDiagnoser::match
bool match(QualType T) override
Match an integral or (possibly scoped) enumeration type.
Definition: SemaOverload.cpp:5951
clang::CanThrowResult
CanThrowResult
Possible results from evaluation of a noexcept expression.
Definition: ExceptionSpecificationType.h:54
clang::Sema::LookupCopyingConstructor
CXXConstructorDecl * LookupCopyingConstructor(CXXRecordDecl *Class, unsigned Quals)
Look up the copying constructor for the given class.
Definition: SemaLookup.cpp:3357
clang::Sema::AddAlignValueAttr
void AddAlignValueAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
AddAlignValueAttr - Adds an align_value attribute to a particular declaration.
clang::Sema::SemaDiagnosticBuilder::K_Nop
@ K_Nop
Emit no diagnostics.
Definition: Sema.h:1944
clang::OpenMPDefaultmapClauseKind
OpenMPDefaultmapClauseKind
OpenMP attributes for 'defaultmap' clause.
Definition: OpenMPKinds.h:110
clang::Sema::BuildExpressionFromDeclTemplateArgument
ExprResult BuildExpressionFromDeclTemplateArgument(const TemplateArgument &Arg, QualType ParamType, SourceLocation Loc)
Given a non-type template argument that refers to a declaration and the type of its corresponding non...
Definition: SemaTemplate.cpp:7487
clang::Sema::FST_OSLog
@ FST_OSLog
Definition: Sema.h:13330
clang::Sema::CheckCategoryVsClassMethodMatches
void CheckCategoryVsClassMethodMatches(ObjCCategoryImplDecl *CatIMP)
CheckCategoryVsClassMethodMatches - Checks that methods implemented in category matches with those im...
Definition: SemaDeclObjC.cpp:2929
clang::Sema::CheckMemberSpecialization
bool CheckMemberSpecialization(NamedDecl *Member, LookupResult &Previous)
Perform semantic analysis for the given non-template member specialization.
Definition: SemaTemplate.cpp:9196
clang::Sema::tryCaptureObjCSelf
ObjCMethodDecl * tryCaptureObjCSelf(SourceLocation Loc)
Try to capture an implicit reference to 'self'.
Definition: SemaExprObjC.cpp:1415
clang::Sema::ExpressionEvaluationContextRecord::SavedMaybeODRUseExprs
MaybeODRUseExprSet SavedMaybeODRUseExprs
Definition: Sema.h:1447
clang::Sema::StdInitializerList
ClassTemplateDecl * StdInitializerList
The C++ "std::initializer_list" template, which is defined in <initializer_list>.
Definition: Sema.h:1308
clang::PreferredTypeBuilder::enterUnary
void enterUnary(Sema &S, SourceLocation Tok, tok::TokenKind OpKind, SourceLocation OpLoc)
Definition: SemaCodeComplete.cpp:575
clang::Sema::MarkThisReferenced
void MarkThisReferenced(CXXThisExpr *This)
Definition: SemaExprCXX.cpp:1398
clang::Sema::FST_Kprintf
@ FST_Kprintf
Definition: Sema.h:13327
clang::Sema::AssumedTemplateKind
AssumedTemplateKind
Definition: Sema.h:7872
clang::Sema::RequireNonAbstractType
bool RequireNonAbstractType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Definition: SemaDeclCXX.cpp:5793
clang::Sema::VariadicCallType
VariadicCallType
Definition: Sema.h:12024
clang::Sema::DefaultedFunctionKind::DefaultedFunctionKind
DefaultedFunctionKind()
Definition: Sema.h:3455
clang::Sema::CodeSynthesisContext::TemplateInstantiation
@ TemplateInstantiation
We are instantiating a template declaration.
Definition: Sema.h:9053
clang::Sema::IsSimplyAccessible
bool IsSimplyAccessible(NamedDecl *Decl, CXXRecordDecl *NamingClass, QualType BaseType)
Checks access to Target from the given class.
Definition: SemaAccess.cpp:1935
clang::Sema::AbstractIvarType
@ AbstractIvarType
Definition: Sema.h:7805
clang::Sema::ActOnCXXFoldExpr
ExprResult ActOnCXXFoldExpr(Scope *S, SourceLocation LParenLoc, Expr *LHS, tok::TokenKind Operator, SourceLocation EllipsisLoc, Expr *RHS, SourceLocation RParenLoc)
Handle a C++1z fold-expression: ( expr op ... op expr ).
Definition: SemaTemplateVariadic.cpp:1186
clang::Sema::CheckObjCForCollectionOperand
ExprResult CheckObjCForCollectionOperand(SourceLocation forLoc, Expr *collection)
Definition: SemaStmt.cpp:2199
clang::Sema::CheckComparisonCategoryType
QualType CheckComparisonCategoryType(ComparisonCategoryType Kind, SourceLocation Loc, ComparisonCategoryUsage Usage)
Lookup the specified comparison category types in the standard library, an check the VarDecls possibl...
Definition: SemaDeclCXX.cpp:11339
clang::Sema::PendingLocalImplicitInstantiations
std::deque< PendingImplicitInstantiation > PendingLocalImplicitInstantiations
The queue of implicit template instantiations that are required and must be performed within the curr...
Definition: Sema.h:9673
clang::Sema::VisContext
void * VisContext
VisContext - Manages the stack for #pragma GCC visibility.
Definition: Sema.h:905
clang::DeclAccessPair
A POD class for pairing a NamedDecl* with an access specifier.
Definition: DeclAccessPair.h:29
clang::VectorType
Represents a GCC generic vector type.
Definition: Type.h:3244
clang::Sema::LateInstantiatedAttribute::TmplAttr
const Attr * TmplAttr
Definition: Sema.h:9829
clang::Sema::getNullabilityKeyword
IdentifierInfo * getNullabilityKeyword(NullabilityKind nullability)
Retrieve the keyword associated.
Definition: SemaType.cpp:4013
clang::Sema::ActOnSYCLBuiltinNumBasesExpr
ExprResult ActOnSYCLBuiltinNumBasesExpr(ParsedType PT)
Get the number of base classes within the parsed type.
Definition: SemaSYCL.cpp:248
clang::Sema::SemaDiagnosticBuilder::K_Immediate
@ K_Immediate
Emit the diagnostic immediately (i.e., behave like Sema::Diag()).
Definition: Sema.h:1946
clang::Sema::CTAK_Deduced
@ CTAK_Deduced
The template argument was deduced via template argument deduction.
Definition: Sema.h:8191
clang::Sema::ActOnField
Decl * ActOnField(Scope *S, Decl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth)
ActOnField - Each field of a C struct/union is passed into this in order to create a FieldDecl object...
Definition: SemaDecl.cpp:17034
clang::Sema::VariadicConstructor
@ VariadicConstructor
Definition: Sema.h:12028
clang::Sema::PushDeclContext
void PushDeclContext(Scope *S, DeclContext *DC)
Set the current declaration context until it gets popped.
Definition: SemaDecl.cpp:1305
clang::Sema::DefaultFunctionArrayConversion
ExprResult DefaultFunctionArrayConversion(Expr *E, bool Diagnose=true)
DefaultFunctionArrayConversion (C99 6.3.2.1p3, C99 6.3.2.1p4).
Definition: SemaExpr.cpp:543
clang::Sema::PCSK_BSS
@ PCSK_BSS
Definition: Sema.h:630
clang::Sema::CodeSynthesisContext::RequirementInstantiation
@ RequirementInstantiation
We are instantiating a requirement of a requires expression.
Definition: Sema.h:9096
clang::FPOptionsOverride
Represents difference between two FPOptions values.
Definition: LangOptions.h:654
clang::MaterializeTemporaryExpr
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Definition: ExprCXX.h:4479
clang::Sema::ActOnOpenMPTargetTeamsDirective
StmtResult ActOnOpenMPTargetTeamsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target teams' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13734
clang::Sema::InstantiatingTemplate::ConstraintSubstitution
Definition: Sema.h:9407
clang::Sema::LateTemplateParser
LateTemplateParserCB * LateTemplateParser
Definition: Sema.h:1081
clang::index::SymbolKind::Module
@ Module
clang::Sema::AccessCheckingSFINAE
bool AccessCheckingSFINAE
When true, access checking violations are treated as SFINAE failures rather than hard errors.
Definition: Sema.h:7797
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:208
clang::LangOptions::FPExceptionModeKind
FPExceptionModeKind
Possible floating point exception behavior.
Definition: LangOptions.h:237
clang::Sema::getInheritingConstructorName
ParsedType getInheritingConstructorName(CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo &Name)
Handle the result of the special case name lookup for inheriting constructor declarations.
Definition: SemaExprCXX.cpp:49
clang::Sema::SelectorSet
llvm::SmallPtrSet< Selector, 8 > SelectorSet
Definition: Sema.h:4734
clang::Sema::resolveAddressOfSingleOverloadCandidate
FunctionDecl * resolveAddressOfSingleOverloadCandidate(Expr *E, DeclAccessPair &FoundResult)
Given an expression that refers to an overloaded function, try to resolve that function to a single f...
Definition: SemaOverload.cpp:12426
clang::MultiTemplateParamsArg
MutableArrayRef< TemplateParameterList * > MultiTemplateParamsArg
Definition: Ownership.h:276
clang::Sema::ActOnSkippedFunctionBody
Decl * ActOnSkippedFunctionBody(Decl *Decl)
Definition: SemaDecl.cpp:14664
clang::Sema::AbstractArrayType
@ AbstractArrayType
Definition: Sema.h:7807
clang::Sema::FinalizeDeclaration
void FinalizeDeclaration(Decl *D)
FinalizeDeclaration - called by ParseDeclarationAfterDeclarator to perform any semantic actions neces...
Definition: SemaDecl.cpp:13593
clang::ExprResult
ActionResult< Expr * > ExprResult
Definition: Ownership.h:262
clang::Sema::canFullyTypeCheckRedeclaration
bool canFullyTypeCheckRedeclaration(ValueDecl *NewD, ValueDecl *OldD, QualType NewT, QualType OldT)
Determines if we can perform a correct type check for D as a redeclaration of PrevDecl.
Definition: SemaDecl.cpp:10327
clang::Sema::RefersToMemberWithReducedAlignment
void RefersToMemberWithReducedAlignment(Expr *E, llvm::function_ref< void(Expr *, RecordDecl *, FieldDecl *, CharUnits)> Action)
This function calls Action when it determines that E designates a misaligned member due to the packed...
Definition: SemaChecking.cpp:17043
clang::Sema::CheckConstexprKind::Diagnose
@ Diagnose
Diagnose issues that are non-constant or that are extensions.
clang::Sema::hasVisibleDefinition
bool hasVisibleDefinition(const NamedDecl *D)
Definition: Sema.h:2559
clang::Sema::ModuleDeclKind::PartitionInterface
@ PartitionInterface
'export module X:Y;'
clang::Sema::InstantiateAttrs
void InstantiateAttrs(const MultiLevelTemplateArgumentList &TemplateArgs, const Decl *Pattern, Decl *Inst, LateInstantiatedAttrVec *LateAttrs=nullptr, LocalInstantiationScope *OuterMostScope=nullptr)
Definition: SemaTemplateInstantiateDecl.cpp:958
clang::Sema::CFP_SameSide
@ CFP_SameSide
Definition: Sema.h:12841
clang::CPlusPlus
@ CPlusPlus
Definition: LangStandard.h:48
clang::Sema::CheckForConstantInitializer
bool CheckForConstantInitializer(Expr *e, QualType t)
type checking declaration initializers (C99 6.7.8)
Definition: SemaDecl.cpp:11561
clang::Sema::addMethodToGlobalList
void addMethodToGlobalList(ObjCMethodList *List, ObjCMethodDecl *Method)
Add the given method to the list of globally-known methods.
Definition: SemaDeclObjC.cpp:3304
clang::ArrayType
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Definition: Type.h:2898
clang::Sema::warnOnReservedIdentifier
void warnOnReservedIdentifier(const NamedDecl *D)
Definition: SemaDecl.cpp:5786
clang::Sema::CheckConstructorAccess
AccessResult CheckConstructorAccess(SourceLocation Loc, CXXConstructorDecl *D, DeclAccessPair FoundDecl, const InitializedEntity &Entity, bool IsCopyBindingRefToTemp=false)
Checks access to a constructor.
Definition: SemaAccess.cpp:1629
clang::Sema::getCurFunctionOrMethodDecl
NamedDecl * getCurFunctionOrMethodDecl()
getCurFunctionOrMethodDecl - Return the Decl for the current ObjC method or C function we're in,...
Definition: Sema.cpp:1505
clang::Sema::ActOnOpenMPReductionClause
OMPClause * ActOnOpenMPReductionClause(ArrayRef< Expr * > VarList, OpenMPReductionClauseModifier Modifier, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=llvm::None)
Called on well-formed 'reduction' clause.
Definition: SemaOpenMP.cpp:18918
clang::Sema::GlobalMethodPool::end
iterator end()
Definition: Sema.h:1639
clang::Sema::ActOnExprStmt
StmtResult ActOnExprStmt(ExprResult Arg, bool DiscardedValue=true)
Definition: SemaStmt.cpp:46
clang::Sema::ActOnBaseSpecifiers
void ActOnBaseSpecifiers(Decl *ClassDecl, MutableArrayRef< CXXBaseSpecifier * > Bases)
ActOnBaseSpecifiers - Attach the given base specifiers to the class, after checking whether there are...
Definition: SemaDeclCXX.cpp:2824
clang::Sema::BuildQualifiedType
QualType BuildQualifiedType(QualType T, SourceLocation Loc, Qualifiers Qs, const DeclSpec *DS=nullptr)
Definition: SemaType.cpp:1901
clang::Sema::ActOnOpenMPDeclareMapperDirectiveVarDecl
ExprResult ActOnOpenMPDeclareMapperDirectiveVarDecl(Scope *S, QualType MapperType, SourceLocation StartLoc, DeclarationName VN)
Build the mapper variable of '#pragma omp declare mapper'.
Definition: SemaOpenMP.cpp:21549
clang::Sema::GlobalNewDeleteDeclared
bool GlobalNewDeleteDeclared
A flag to remember whether the implicit forms of operator new and delete have been declared.
Definition: Sema.h:1374
clang::Sema::getLambdaConversionFunctionResultType
QualType getLambdaConversionFunctionResultType(const FunctionProtoType *CallOpType, CallingConv CC)
Get the return type to use for a lambda's conversion function(s) to function pointer type,...
Definition: SemaLambda.cpp:1338
clang::Sema::TryCapture_Implicit
@ TryCapture_Implicit
Definition: Sema.h:5400
clang::Sema::AlignPackInfo::AlignPackInfo
AlignPackInfo(bool IsXL)
Definition: Sema.h:682
clang::Sema::GlobalEagerInstantiationScope::GlobalEagerInstantiationScope
GlobalEagerInstantiationScope(Sema &S, bool Enabled)
Definition: Sema.h:9622
clang::Sema::CheckImplementationIvars
void CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, ObjCIvarDecl **Fields, unsigned nIvars, SourceLocation Loc)
CheckImplementationIvars - This routine checks if the instance variables listed in the implelementati...
Definition: SemaDeclObjC.cpp:2115
clang::FileNullabilityMap::File
FileID File
Definition: Sema.h:270
clang::Sema::LK_Dictionary
@ LK_Dictionary
Definition: Sema.h:3965
clang::Sema::AlignPackInfo::Native
@ Native
Definition: Sema.h:669
clang::Sema::TemplateNameKindForDiagnostics::ClassTemplate
@ ClassTemplate
clang::Sema::NSValuePointer
QualType NSValuePointer
Pointer to NSValue type (NSValue *).
Definition: Sema.h:1337
clang::Sema::DeduceVariableDeclarationType
bool DeduceVariableDeclarationType(VarDecl *VDecl, bool DirectInit, Expr *Init)
Definition: SemaDecl.cpp:12061
clang::Sema::OCK_None
@ OCK_None
Definition: Sema.h:9943
clang::Sema::PCC_RecoveryInFunction
@ PCC_RecoveryInFunction
Code completion occurs within the body of a function on a recovery path, where we do not have a speci...
Definition: Sema.h:12989
clang::Sema::AlignPackInfo::AlignPackInfo
AlignPackInfo()
Definition: Sema.h:684
clang::Sema::CFP_Native
@ CFP_Native
Definition: Sema.h:12843
clang::Sema::AddAnnotationAttr
void AddAnnotationAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Annot, MutableArrayRef< Expr * > Args)
AddAnnotationAttr - Adds an annotation Annot with Args arguments to D.
clang::Sema::PragmaStackSentinelRAII::PragmaStackSentinelRAII
PragmaStackSentinelRAII(Sema &S, StringRef SlotLabel, bool ShouldAct)
Definition: SemaAttr.cpp:27
clang::Sema::mergeOptimizeNoneAttr
OptimizeNoneAttr * mergeOptimizeNoneAttr(Decl *D, const AttributeCommonInfo &CI)
clang::Sema::hasAnyAcceptableTemplateNames
bool hasAnyAcceptableTemplateNames(LookupResult &R, bool AllowFunctionTemplates=true, bool AllowDependent=true, bool AllowNonTemplateFunctions=false)
Definition: SemaTemplate.cpp:155
clang::Sema::BuildSynthesizedThreeWayComparison
ExprResult BuildSynthesizedThreeWayComparison(SourceLocation OpLoc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, FunctionDecl *DefaultedFn)
Definition: SemaOverload.cpp:14002
clang::Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope
void ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, SmallVectorImpl< FunctionDecl * > &Bases)
The declarator D defines a function in the scope S which is nested in an omp begin/end declare varian...
Definition: SemaOpenMP.cpp:6806
clang::Sema::ImmediateDiagBuilder::operator<<
const ImmediateDiagBuilder & operator<<(T &&V) const
Definition: Sema.h:1868
clang::Sema::TemplateTy
OpaquePtr< TemplateName > TemplateTy
Definition: Sema.h:579
clang::Sema::ExpressionEvaluationContextRecord::NumTypos
unsigned NumTypos
The number of typos encountered during this expression evaluation context (i.e.
Definition: Sema.h:1445
clang::Sema::VAK_Valid
@ VAK_Valid
Definition: Sema.h:12039
clang::Sema::ActOnMethodDeclaration
Decl * ActOnMethodDeclaration(Scope *S, SourceLocation BeginLoc, SourceLocation EndLoc, tok::TokenKind MethodType, ObjCDeclSpec &ReturnQT, ParsedType ReturnType, ArrayRef< SourceLocation > SelectorLocs, Selector Sel, ObjCArgInfo *ArgInfo, DeclaratorChunk::ParamInfo *CParamInfo, unsigned CNumArgs, const ParsedAttributesView &AttrList, tok::ObjCKeywordKind MethodImplKind, bool isVariadic, bool MethodDefinition)
Definition: SemaDeclObjC.cpp:4704
clang::Sema::IER_DoesNotExist
@ IER_DoesNotExist
The symbol does not exist.
Definition: Sema.h:5974
clang::DecompositionDecl
A decomposition declaration.
Definition: DeclCXX.h:4036
clang::LangOptions::FPEvalMethodKind
FPEvalMethodKind
Possible float expression evaluation method choices.
Definition: LangOptions.h:247
clang::Sema::NamedReturnInfo::Status
Status
Definition: Sema.h:5154
clang::Sema::FullExprArg
Definition: Sema.h:4962
clang::Sema::ActOnOpenMPReverseOffloadClause
OMPClause * ActOnOpenMPReverseOffloadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'reverse_offload' clause.
Definition: SemaOpenMP.cpp:16639
clang::Sema::PointerToInt
@ PointerToInt
PointerToInt - The assignment converts a pointer to an int, which we accept as an extension.
Definition: Sema.h:12116
Depth
int Depth
Definition: ASTDiff.cpp:191
clang::WeakInfo
Captures information about a #pragma weak directive.
Definition: Weak.h:25
clang::Sema::LiteralOperatorLookupResult
LiteralOperatorLookupResult
The possible outcomes of name lookup for a literal operator.
Definition: Sema.h:4380
clang::Sema::BuildResolvedCoawaitExpr
ExprResult BuildResolvedCoawaitExpr(SourceLocation KwLoc, Expr *E, bool IsImplicit=false)
Definition: SemaCoroutine.cpp:863
clang::Sema::ExpressionEvaluationContextRecord::ExprContext
enum clang::Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext
clang::Sema::mergeTypeVisibilityAttr
TypeVisibilityAttr * mergeTypeVisibilityAttr(Decl *D, const AttributeCommonInfo &CI, TypeVisibilityAttr::VisibilityType Vis)
clang::Sema::CXXCopyConstructor
@ CXXCopyConstructor
Definition: Sema.h:1671
clang::concepts::NestedRequirement
A requires-expression requirement which is satisfied when a general constraint expression is satisfie...
Definition: ExprConcepts.h:407
clang::Sema::ActOnNonTypeTemplateParameter
NamedDecl * ActOnNonTypeTemplateParameter(Scope *S, Declarator &D, unsigned Depth, unsigned Position, SourceLocation EqualLoc, Expr *DefaultArg)
Definition: SemaTemplate.cpp:1466
clang::Sema::ArgumentPackSubstitutionIndexRAII::~ArgumentPackSubstitutionIndexRAII
~ArgumentPackSubstitutionIndexRAII()
Definition: Sema.h:9283
clang::PseudoDestructorTypeStorage
Stores the type being destroyed by a pseudo-destructor expression.
Definition: ExprCXX.h:2483
clang::VisibleModuleSet
A set of visible modules.
Definition: Module.h:690
clang::Sema::SFINAETrap::hasErrorOccurred
bool hasErrorOccurred() const
Determine whether any SFINAE errors have been trapped.
Definition: Sema.h:9554
clang::Sema::NameClassification::Type
ParsedType Type
Definition: Sema.h:2768
clang::Sema::GlobalMethodPool::begin
iterator begin()
Definition: Sema.h:1638
clang::Sema::BuildInstanceMessageImplicit
ExprResult BuildInstanceMessageImplicit(Expr *Receiver, QualType ReceiverType, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
Definition: SemaExprObjC.cpp:2781
TypeTraits.h
clang::FunctionProtoType::ExceptionSpecInfo::Exceptions
ArrayRef< QualType > Exceptions
Explicitly-specified list of exception types.
Definition: Type.h:3962
clang::Sema::ActOnPragmaPack
void ActOnPragmaPack(SourceLocation PragmaLoc, PragmaMsStackAction Action, StringRef SlotLabel, Expr *Alignment)
ActOnPragmaPack - Called on well formed #pragma pack(...).
Definition: SemaAttr.cpp:321
clang::Sema::FindHiddenVirtualMethods
void FindHiddenVirtualMethods(CXXMethodDecl *MD, SmallVectorImpl< CXXMethodDecl * > &OverloadedMethods)
Check if a method overloads virtual methods in a base class without overriding any.
Definition: SemaDeclCXX.cpp:9987
clang::Sema::ExpressionEvaluationContextRecord::PossibleDerefs
llvm::SmallPtrSet< const Expr *, 8 > PossibleDerefs
Definition: Sema.h:1466
clang::OpenMPOrderClauseKind
OpenMPOrderClauseKind
OpenMP attributes for 'order' clause.
Definition: OpenMPKinds.h:150
clang::Sema::CodeCompleteAttribute
void CodeCompleteAttribute(AttributeCommonInfo::Syntax Syntax, AttributeCompletion Completion=AttributeCompletion::Attribute, const IdentifierInfo *Scope=nullptr)
Definition: SemaCodeComplete.cpp:4465
clang::Sema::DelayedDiagnostics::popUndelayed
void popUndelayed(DelayedDiagnosticsState state)
Undo a previous pushUndelayed().
Definition: Sema.h:1149
clang::Sema::NameClassification::getExpression
ExprResult getExpression() const
Definition: Sema.h:2838
clang::Sema::CodeCompleteObjCImplementationDecl
void CodeCompleteObjCImplementationDecl(Scope *S)
Definition: SemaCodeComplete.cpp:8389
clang::Sema::VariadicBlock
@ VariadicBlock
Definition: Sema.h:12026
clang::ASTConsumer
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.
Definition: ASTConsumer.h:33
clang::Sema::FindFirstQualifierInScope
NamedDecl * FindFirstQualifierInScope(Scope *S, NestedNameSpecifier *NNS)
If the given nested-name-specifier begins with a bare identifier (e.g., Base::), perform name lookup ...
Definition: SemaCXXScopeSpec.cpp:372
clang::Sema::isUnavailableAlignedAllocationFunction
bool isUnavailableAlignedAllocationFunction(const FunctionDecl &FD) const
Determine whether FD is an aligned allocation or deallocation function that is unavailable.
Definition: SemaExprCXX.cpp:1924
clang::Sema::Initialize
void Initialize()
Perform initialization that occurs after the parser has been initialized but before it parses anythin...
Definition: Sema.cpp:278
clang::Sema::DeclApplyPragmaWeak
void DeclApplyPragmaWeak(Scope *S, NamedDecl *ND, const WeakInfo &W)
clang::Sema::DeviceDiagnosticReason::Esimd
@ Esimd
ESIMD specific diagnostic.
clang::Sema::ActOnTypeRequirement
concepts::Requirement * ActOnTypeRequirement(SourceLocation TypenameKWLoc, CXXScopeSpec &SS, SourceLocation NameLoc, IdentifierInfo *TypeName, TemplateIdAnnotation *TemplateId)
Definition: SemaExprCXX.cpp:8762
clang::Sema::ExpressionEvaluationContext::Unevaluated
@ Unevaluated
The current expression and its subexpressions occur within an unevaluated operand (C++11 [expr]p7),...
clang::Sema::MaximumAlignment
static const uint64_t MaximumAlignment
Definition: Sema.h:576
clang::Sema::SubstTemplateArguments
bool SubstTemplateArguments(ArrayRef< TemplateArgumentLoc > Args, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateArgumentListInfo &Outputs)
Definition: SemaTemplateInstantiate.cpp:3557
clang::Sema::PerformQualificationConversion
ExprResult PerformQualificationConversion(Expr *E, QualType Ty, ExprValueKind VK=VK_PRValue, CheckedConversionKind CCK=CCK_ImplicitConversion)
Definition: SemaInit.cpp:7969
clang::Sema::AlignPackInfo
Definition: Sema.h:665
clang::Sema::FormatStringType
FormatStringType
Definition: Sema.h:13321
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:61
clang::Sema::ActOnOpenMPCancellationPointDirective
StmtResult ActOnOpenMPCancellationPointDirective(SourceLocation StartLoc, SourceLocation EndLoc, OpenMPDirectiveKind CancelRegion)
Called on well-formed '#pragma omp cancellation point'.
Definition: SemaOpenMP.cpp:12863
clang::Sema::FunctionEmissionStatus::CUDADiscarded
@ CUDADiscarded
clang::Sema::ActOnOpenMPTargetParallelForSimdDirective
StmtResult ActOnOpenMPTargetParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel for simd' after parsing of the associated statemen...
Definition: SemaOpenMP.cpp:13406
clang::ASTMutationListener
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
Definition: ASTMutationListener.h:46
clang::Sema::CodeCompleteExpression
void CodeCompleteExpression(Scope *S, const CodeCompleteExpressionData &Data)
Perform code-completion in an expression context when we know what type we're looking for.
Definition: SemaCodeComplete.cpp:4714
clang::Sema::DiagnoseUnexpandedParameterPack
bool DiagnoseUnexpandedParameterPack(SourceLocation Loc, TypeSourceInfo *T, UnexpandedParameterPackContext UPPC)
If the given type contains an unexpanded parameter pack, diagnose the error.
Definition: SemaTemplateVariadic.cpp:380
clang::Sema::BuildWritePipeType
QualType BuildWritePipeType(QualType T, SourceLocation Loc)
Build a Write-only Pipe type.
Definition: SemaType.cpp:2263
OpenMPKinds.h
clang::concepts::Requirement
A static requirement that can be used in a requires-expression to check properties of types and expre...
Definition: ExprConcepts.h:149
clang::EST_DynamicNone
@ EST_DynamicNone
throw()
Definition: ExceptionSpecificationType.h:22
clang::Sema::CCEK_Noexcept
@ CCEK_Noexcept
Condition in a noexcept(bool) specifier.
Definition: Sema.h:3868
clang::Sema::PSK_CodeSeg
@ PSK_CodeSeg
Definition: Sema.h:10406
clang::Sema::NestedNameSpecInfo::ObjectType
ParsedType ObjectType
The type of the object, if we're parsing nested-name-specifier in a member access expression.
Definition: Sema.h:6882
clang::Sema::ShouldSplatAltivecScalarInCast
bool ShouldSplatAltivecScalarInCast(const VectorType *VecTy)
Definition: SemaCast.cpp:2640
clang::Sema::ExpressionEvaluationContextRecord::DelayedDecltypeBinds
SmallVector< CXXBindTemporaryExpr *, 8 > DelayedDecltypeBinds
If we are processing a decltype type, a set of temporary binding expressions for which we have deferr...
Definition: Sema.h:1464
clang::Sema::MSStructPragmaOn
bool MSStructPragmaOn
Definition: Sema.h:609
clang::Sema::TemplateNameKindForDiagnostics::VarTemplate
@ VarTemplate
clang::Sema::ActOnStartOfObjCMethodDef
void ActOnStartOfObjCMethodDef(Scope *S, Decl *D)
ActOnStartOfObjCMethodDef - This routine sets up parameters; invisible and user declared,...
Definition: SemaDeclObjC.cpp:362
clang::Sema::AssignConvertType
AssignConvertType
AssignConvertType - All of the 'assignment' semantic checks return this enum to indicate whether the ...
Definition: Sema.h:12110
clang::MultiLevelTemplateArgumentList
Data structure that captures multiple levels of template argument lists for use in template instantia...
Definition: Template.h:75
clang::Sema::BuildObjCExceptionDecl
VarDecl * BuildObjCExceptionDecl(TypeSourceInfo *TInfo, QualType ExceptionType, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, bool Invalid=false)
Build a type-check a new Objective-C exception variable declaration.
Definition: SemaDeclObjC.cpp:5123
clang::Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution
@ DeducedTemplateArgumentSubstitution
We are substituting template argument determined as part of template argument deduction for either a ...
Definition: Sema.h:9076
clang::Sema::ActOnMemberAccessExtraArgs::ObjCImpDecl
Decl * ObjCImpDecl
Definition: Sema.h:5740
clang::Sema::ContextualImplicitConverter::SuppressConversion
bool SuppressConversion
Definition: Sema.h:3881
clang::Sema::RequireCompleteType
bool RequireCompleteType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &...Args)
Definition: Sema.h:2609
clang::Sema::DefaultedComparisonKind::None
@ None
This is not a defaultable comparison operator.
clang::FPOptions
Definition: LangOptions.h:534
clang::Sema::PragmaClangSection::SectionName
std::string SectionName
Definition: Sema.h:643
clang::Sema::AddInitializerToDecl
void AddInitializerToDecl(Decl *dcl, Expr *init, bool DirectInit)
AddInitializerToDecl - Adds the initializer Init to the declaration dcl.
Definition: SemaDecl.cpp:12371
clang::Sema::PerformContextuallyConvertToBool
ExprResult PerformContextuallyConvertToBool(Expr *From)
PerformContextuallyConvertToBool - Perform a contextual conversion of the expression From to bool (C+...
Definition: SemaOverload.cpp:5608
clang::Sema::CheckSpecifiedExceptionType
bool CheckSpecifiedExceptionType(QualType &T, SourceRange Range)
CheckSpecifiedExceptionType - Check if the given type is valid in an exception specification.
Definition: SemaExceptionSpec.cpp:120
clang::Sema::Ovl_Match
@ Ovl_Match
This is not an overload because the signature exactly matches an existing declaration.
Definition: Sema.h:3765
ObjCMethodList.h
clang::Sema::Diags
DiagnosticsEngine & Diags
Definition: Sema.h:589
clang::ExternalSemaSource
An abstract interface that should be implemented by external AST sources that also provide informatio...
Definition: ExternalSemaSource.h:50
clang::Sema::ClassifyName
NameClassification ClassifyName(Scope *S, CXXScopeSpec &SS, IdentifierInfo *&Name, SourceLocation NameLoc, const Token &NextToken, CorrectionCandidateCallback *CCC=nullptr)
Perform name lookup on the given name, classifying it based on the results of name lookup and the fol...
Definition: SemaDecl.cpp:859
clang::Sema::diagIfOpenMPHostCode
SemaDiagnosticBuilder diagIfOpenMPHostCode(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host cod...
Definition: SemaOpenMP.cpp:1952
clang::Sema::LateTemplateParserCB
void LateTemplateParserCB(void *P, LateParsedTemplate &LPT)
Callback to the parser to parse templated functions when needed.
Definition: Sema.h:1079
clang::Sema::CanPerformCopyInitialization
bool CanPerformCopyInitialization(const InitializedEntity &Entity, ExprResult Init)
Definition: SemaInit.cpp:9892
clang::Sema::DiagRuntimeBehavior
bool DiagRuntimeBehavior(SourceLocation Loc, const Stmt *Statement, const PartialDiagnostic &PD)
Conditionally issue a diagnostic based on the current evaluation context.
Definition: SemaExpr.cpp:19468
clang::Sema::TypoRecoveryCallback
std::function< ExprResult(Sema &, TypoExpr *, TypoCorrection)> TypoRecoveryCallback
Definition: Sema.h:4411
clang::LambdaCaptureDefault
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
Definition: Lambda.h:22
clang::Sema::PushBlockScope
void PushBlockScope(Scope *BlockScope, BlockDecl *Block)
Definition: Sema.cpp:2189
clang::LabelDecl
Represents the declaration of a label.
Definition: Decl.h:495
clang::Sema::getDecltypeForExpr
QualType getDecltypeForExpr(Expr *E)
getDecltypeForExpr - Given an expr, will return the decltype for that expression, according to the ru...
Definition: SemaType.cpp:9092
clang::Sema::ConditionError
static ConditionResult ConditionError()
Definition: Sema.h:12559
clang::Sema::CheckCompleteDestructorVariant
void CheckCompleteDestructorVariant(SourceLocation CurrentLocation, CXXDestructorDecl *Dtor)
Do semantic checks to allow the complete destructor variant to be emitted when the destructor is defi...
Definition: SemaDeclCXX.cpp:13803
clang::PseudoObjectExpr
PseudoObjectExpr - An expression which accesses a pseudo-object l-value.
Definition: Expr.h:6153
clang::Sema::TPC_ClassTemplateMember
@ TPC_ClassTemplateMember
Definition: Sema.h:8001
clang::Sema::AddLaunchBoundsAttr
void AddLaunchBoundsAttr(Decl *D, const AttributeCommonInfo &CI, Expr *MaxThreads, Expr *MinBlocks)
AddLaunchBoundsAttr - Adds a launch_bounds attribute to a particular declaration.
clang::Sema::ActOnBlockStart
void ActOnBlockStart(SourceLocation CaretLoc, Scope *CurScope)
ActOnBlockStart - This callback is invoked when a block literal is started.
Definition: SemaExpr.cpp:15879
clang::Sema::ProcessAccessDeclAttributeList
bool ProcessAccessDeclAttributeList(AccessSpecDecl *ASDecl, const ParsedAttributesView &AttrList)
clang::Sema::BuildMemberPointerType
QualType BuildMemberPointerType(QualType T, QualType Class, SourceLocation Loc, DeclarationName Entity)
Build a member pointer type T Class::*.
Definition: SemaType.cpp:2945
clang::Sema::ActOnOpenMPTargetTeamsDistributeSimdDirective
StmtResult ActOnOpenMPTargetTeamsDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute simd' after parsing of the associated stat...
Definition: SemaOpenMP.cpp:13922
clang::Sema::AMK_None
@ AMK_None
Don't merge availability attributes at all.
Definition: Sema.h:3638
clang::Sema::VerifyICEDiagnoser::diagnoseNotICEType
virtual SemaDiagnosticBuilder diagnoseNotICEType(Sema &S, SourceLocation Loc, QualType T)
Definition: SemaExpr.cpp:16803
clang::Sema::MergeReqdWorkGroupSizeAttr
ReqdWorkGroupSizeAttr * MergeReqdWorkGroupSizeAttr(Decl *D, const ReqdWorkGroupSizeAttr &A)
clang::Sema::BuildCXXTypeId
ExprResult BuildCXXTypeId(QualType TypeInfoType, SourceLocation TypeidLoc, TypeSourceInfo *Operand, SourceLocation RParenLoc)
Build a C++ typeid expression with a type operand.
Definition: SemaExprCXX.cpp:533
clang::ComparisonCategoryType
ComparisonCategoryType
An enumeration representing the different comparison categories types.
Definition: ComparisonCategories.h:44
clang::Sema::ACK_Arithmetic
@ ACK_Arithmetic
An arithmetic operation.
Definition: Sema.h:12086
clang::Sema::tryCaptureVariable
bool tryCaptureVariable(VarDecl *Var, SourceLocation Loc, TryCaptureKind Kind, SourceLocation EllipsisLoc, bool BuildAndDiagnose, QualType &CaptureType, QualType &DeclRefType, const unsigned *const FunctionScopeIndexToStopAt)
Try to capture the given variable.
Definition: SemaExpr.cpp:18331
clang::Sema::LookupObjCProtocolName
@ LookupObjCProtocolName
Look up the name of an Objective-C protocol.
Definition: Sema.h:4342
clang::Sema::ActOnOpenMPDispatchDirective
StmtResult ActOnOpenMPDispatchDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp dispatch' after parsing of the.
Definition: SemaOpenMP.cpp:10118
clang::Sema::ModuleImportState::GlobalFragment
@ GlobalFragment
after 'module;' but before 'module X;'
clang::Sema::ActOnPragmaFPContract
void ActOnPragmaFPContract(SourceLocation Loc, LangOptions::FPModeKind FPC)
ActOnPragmaFPContract - Called on well formed #pragma {STDC,OPENCL} FP_CONTRACT and #pragma clang fp ...
Definition: SemaAttr.cpp:1135
clang::Sema::CheckExplicitlyDefaultedSpecialMember
bool CheckExplicitlyDefaultedSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM)
Definition: SemaDeclCXX.cpp:7423
clang::Sema::ModuleDeclKind::Implementation
@ Implementation
'module X;'
CastType
CastType
Definition: SemaCast.cpp:46
clang::Sema::areLaxCompatibleVectorTypes
bool areLaxCompatibleVectorTypes(QualType srcType, QualType destType)
Are the two types lax-compatible vector types? That is, given that one of them is a vector,...
Definition: SemaExpr.cpp:7742
clang::Sema::checkVariadicArgument
void checkVariadicArgument(const Expr *E, VariadicCallType CT)
Check to see if the given expression is a valid argument to a variadic function, issuing a diagnostic...
Definition: SemaExpr.cpp:1009
clang::Sema::DiagnoseNontrivial
void DiagnoseNontrivial(const CXXRecordDecl *Record, CXXSpecialMember CSM)
Diagnose why the specified class does not have a trivial special member of the given kind.
Definition: SemaDeclCXX.cpp:9758
clang::VisibleDeclConsumer
Consumes visible declarations found when searching for all visible names within a given scope or cont...
Definition: Lookup.h:764
clang::Sema::ActOnOpenMPReadClause
OMPClause * ActOnOpenMPReadClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'read' clause.
Definition: SemaOpenMP.cpp:16564
clang::Sema::MMS_loose
@ MMS_loose
Definition: Sema.h:4832
clang::MSGuidDecl
A global _GUID constant.
Definition: DeclCXX.h:4159
clang::Sema::PDiag
PartialDiagnostic PDiag(unsigned DiagID=0)
Build a partial diagnostic.
Definition: SemaInternal.h:24
clang::Sema::NTCUK_Destruct
@ NTCUK_Destruct
Definition: Sema.h:3118
clang::Sema::ActOnOpenMPFromClause
OMPClause * ActOnOpenMPFromClause(ArrayRef< OpenMPMotionModifierKind > MotionModifiers, ArrayRef< SourceLocation > MotionModifiersLoc, CXXScopeSpec &MapperIdScopeSpec, DeclarationNameInfo &MapperId, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs, ArrayRef< Expr * > UnresolvedMappers=llvm::None)
Called on well-formed 'from' clause.
Definition: SemaOpenMP.cpp:22174
clang::Sema::ContextualImplicitConverter
Abstract base class used to perform a contextual implicit conversion from an expression to any type p...
Definition: Sema.h:3878
clang::Sema::IncompatibleFunctionPointer
@ IncompatibleFunctionPointer
IncompatibleFunctionPointer - The assignment is between two function pointers types that are not comp...
Definition: Sema.h:12133
clang::Sema::BFRK_Check
@ BFRK_Check
Determining whether a for-range statement could be built.
Definition: Sema.h:5108
clang::Sema::hasVisibleDefaultArgument
bool hasVisibleDefaultArgument(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if the template parameter D has a visible default argument.
Definition: SemaLookup.cpp:1660
clang::Sema::ActOnCoroutineBodyStart
bool ActOnCoroutineBodyStart(Scope *S, SourceLocation KwLoc, StringRef Keyword)
Definition: SemaCoroutine.cpp:712
clang::TNK_Var_template
@ TNK_Var_template
The name refers to a variable template whose specialization produces a variable.
Definition: TemplateKinds.h:33
clang::CXXDestructorDecl
Represents a C++ destructor within a class.
Definition: DeclCXX.h:2688
clang::Sema::CheckConditionalOperands
QualType CheckConditionalOperands(ExprResult &Cond, ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation QuestionLoc)
Note that LHS is not null here, even if this is the gnu "x ?: y" extension.
Definition: SemaExpr.cpp:8581
clang::Sema::BuildForRangeKind
BuildForRangeKind
Definition: Sema.h:5100
clang::Sema::GetTypeFromParser
static QualType GetTypeFromParser(ParsedType Ty, TypeSourceInfo **TInfo=nullptr)
Definition: SemaType.cpp:3020
clang::Sema::InstantiatingTemplate::isInvalid
bool isInvalid() const
Determines whether we have exceeded the maximum recursive template instantiations.
Definition: Sema.h:9449
clang::Sema::AssumedTemplateKind::None
@ None
This is not assumed to be a template name.
clang::Sema::getCurLambda
sema::LambdaScopeInfo * getCurLambda(bool IgnoreNonLambdaCapturingScope=false)
Retrieve the current lambda scope info, if any.
Definition: Sema.cpp:2405
clang::Sema::TypeTagData::TypeTagData
TypeTagData(QualType Type, bool LayoutCompatible, bool MustBeNull)
Definition: Sema.h:13422
clang::Sema::BuildCStyleCastExpr
ExprResult BuildCStyleCastExpr(SourceLocation LParenLoc, TypeSourceInfo *Ty, SourceLocation RParenLoc, Expr *Op)
Definition: SemaCast.cpp:3233
clang::AutoType
Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained by a type-constraint.
Definition: Type.h:5050
clang::Sema::TypoExprs
llvm::SmallVector< TypoExpr *, 2 > TypoExprs
Holds TypoExprs that are created from createDelayedTypo.
Definition: Sema.h:625
clang::Sema::PSK_Push
@ PSK_Push
Definition: Sema.h:657
clang::Sema::ActOnOpenMPTargetTeamsDistributeDirective
StmtResult ActOnOpenMPTargetTeamsDistributeDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute' after parsing of the associated statement...
Definition: SemaOpenMP.cpp:13765
clang::Sema::NC_DependentNonType
@ NC_DependentNonType
The name denotes a member of a dependent type that could not be resolved.
Definition: Sema.h:2744
clang::Sema::SubstAutoType
QualType SubstAutoType(QualType TypeWithAuto, QualType Replacement)
Substitute Replacement for auto in TypeWithAuto.
Definition: SemaTemplateDeduction.cpp:4804
clang::Sema::PSK_ConstSeg
@ PSK_ConstSeg
Definition: Sema.h:10405
clang::Sema::maybeAddCUDAHostDeviceAttrs
void maybeAddCUDAHostDeviceAttrs(FunctionDecl *FD, const LookupResult &Previous)
May add implicit CUDAHostAttr and CUDADeviceAttr attributes to FD, depending on FD and the current co...
Definition: SemaCUDA.cpp:662
clang::Sema::ActOnDependentMemberExpr
ExprResult ActOnDependentMemberExpr(Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, NamedDecl *FirstQualifierInScope, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaExprMember.cpp:480
clang::TemplateArgumentLoc
Location wrapper for a TemplateArgument.
Definition: TemplateBase.h:457
clang::Sema::getPrintable
static const std::string & getPrintable(const std::string &S)
Definition: Sema.h:2382
clang::ParsedAttr
ParsedAttr - Represents a syntactic attribute.
Definition: ParsedAttr.h:240
clang::Sema::CodeCompleteInitializer
void CodeCompleteInitializer(Scope *S, Decl *D)
Definition: SemaCodeComplete.cpp:6374
clang::Sema::InstantiateClassTemplateSpecializationMembers
void InstantiateClassTemplateSpecializationMembers(SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK)
Instantiate the definitions of all of the members of the given class template specialization,...
Definition: SemaTemplateInstantiate.cpp:3529
clang::OpenMPClauseKind
llvm::omp::Clause OpenMPClauseKind
OpenMP clauses.
Definition: OpenMPKinds.h:27
clang::Sema::AssignmentAction
AssignmentAction
Definition: Sema.h:3746
clang::Sema::KernelCallFunctionPointer
@ KernelCallFunctionPointer
Definition: Sema.h:13686
clang::Type::isSizelessType
bool isSizelessType() const
As an extension, we classify types as one of "sized" or "sizeless"; every type is one or the other.
Definition: Type.cpp:2322
clang::Sema::IsLastErrorImmediate
bool IsLastErrorImmediate
Is the last error level diagnostic immediate.
Definition: Sema.h:2050
clang::Sema::ActOnOpenMPAtomicDirective
StmtResult ActOnOpenMPAtomicDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp atomic' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:11980
clang::Sema::CheckCXXThisCapture
bool CheckCXXThisCapture(SourceLocation Loc, bool Explicit=false, bool BuildAndDiagnose=true, const unsigned *const FunctionScopeIndexToStopAt=nullptr, bool ByCopy=false)
Make sure the value of 'this' is actually available in the current context, if it is a potentially ev...
Definition: SemaExprCXX.cpp:1262
clang::Sema::IncompatibleNestedPointerAddressSpaceMismatch
@ IncompatibleNestedPointerAddressSpaceMismatch
IncompatibleNestedPointerAddressSpaceMismatch - The assignment changes address spaces in nested point...
Definition: Sema.h:12154
clang::TemplateSpecCandidateSet
TemplateSpecCandidateSet - A set of generalized overload candidates, used in template specializations...
Definition: TemplateDeduction.h:316
clang::Sema::ActOnAliasDeclaration
Decl * ActOnAliasDeclaration(Scope *CurScope, AccessSpecifier AS, MultiTemplateParamsArg TemplateParams, SourceLocation UsingLoc, UnqualifiedId &Name, const ParsedAttributesView &AttrList, TypeResult Type, Decl *DeclFromDeclSpec)
Definition: SemaDeclCXX.cpp:12948
clang::Sema::ExpressionEvaluationContextRecord::Context
ExpressionEvaluationContext Context
The expression evaluation context.
Definition: Sema.h:1434
Expr.h
clang::Sema::ShouldDeleteSpecialMember
bool ShouldDeleteSpecialMember(CXXMethodDecl *MD, CXXSpecialMember CSM, InheritedConstructorInfo *ICI=nullptr, bool Diagnose=false)
Determine if a special member function should have a deleted definition when it is defaulted.
Definition: SemaDeclCXX.cpp:9342
clang::Sema::ActOnOpenMPUnrollDirective
StmtResult ActOnOpenMPUnrollDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp unroll' after parsing of its clauses and the associated statement.
Definition: SemaOpenMP.cpp:14239
clang::Sema::CodeCompleteOrdinaryName
void CodeCompleteOrdinaryName(Scope *S, ParserCompletionContext CompletionContext)
Definition: SemaCodeComplete.cpp:4287
clang::Sema::NameClassification::getNonTypeDecl
NamedDecl * getNonTypeDecl() const
Definition: Sema.h:2848
clang::Sema::CodeSynthesisContext
A context in which code is being synthesized (where a source location alone is not sufficient to iden...
Definition: Sema.h:9048
clang::Sema::Ovl_Overload
@ Ovl_Overload
This is a legitimate overload: the existing declarations are functions or function templates with dif...
Definition: Sema.h:3761
clang::Sema::ActOnContinueStmt
StmtResult ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope)
Definition: SemaStmt.cpp:3309
clang::Sema::ActOnModuleInclude
void ActOnModuleInclude(SourceLocation DirectiveLoc, Module *Mod)
The parser has processed a module import translated from a include or similar preprocessing directive...
Definition: SemaModule.cpp:553
clang::Sema::MergeFunctionDecl
bool MergeFunctionDecl(FunctionDecl *New, NamedDecl *&Old, Scope *S, bool MergeTypeWithOld)
MergeFunctionDecl - We just parsed a function 'New' from declarator D which has the same name and sco...
Definition: SemaDecl.cpp:3422
clang::Sema::DeduceAutoResult
DeduceAutoResult
Result type of DeduceAutoType.
Definition: Sema.h:8951
clang::Sema::TooManyArguments
static bool TooManyArguments(size_t NumParams, size_t NumArgs, bool PartialOverloading=false)
To be used for checking whether the arguments being passed to function exceeds the number of paramete...
Definition: Sema.h:13534
clang::Sema::ActOnObjCAtSynchronizedOperand
ExprResult ActOnObjCAtSynchronizedOperand(SourceLocation atLoc, Expr *operand)
Definition: SemaStmt.cpp:4276
clang::Sema::ActOnOpenMPTeamsDistributeParallelForDirective
StmtResult ActOnOpenMPTeamsDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute parallel for' after parsing of the associated sta...
Definition: SemaOpenMP.cpp:13685
clang::FriendDecl
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Definition: DeclFriend.h:53
clang::Sema::ProcessDeclAttributeList
void ProcessDeclAttributeList(Scope *S, Decl *D, const ParsedAttributesView &AL, bool IncludeCXX11Attributes=true)
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1601
clang::Sema::ActOnNullStmt
StmtResult ActOnNullStmt(SourceLocation SemiLoc, bool HasLeadingEmptyMacro=false)
Definition: SemaStmt.cpp:68
clang::Sema::SynthesizedFunctionScope::addContextNote
void addContextNote(SourceLocation UseLoc)
Definition: Sema.h:1230
bool
#define bool
Definition: stdbool.h:20
clang::Sema::CheckConflictingOverridingMethod
void CheckConflictingOverridingMethod(ObjCMethodDecl *Method, ObjCMethodDecl *Overridden, bool IsProtocolMethodDecl)
Definition: SemaDeclObjC.cpp:2591
clang::Sema::AssumedTemplateKind::FoundNothing
@ FoundNothing
This is assumed to be a template name because lookup found nothing.
clang::Sema::ActOnVAArg
ExprResult ActOnVAArg(SourceLocation BuiltinLoc, Expr *E, ParsedType Ty, SourceLocation RPLoc)
Definition: SemaExpr.cpp:16223
clang::OMPVarListLocTy
This structure contains most locations needed for by an OMPVarListClause.
Definition: OpenMPClause.h:176
clang::Sema::ActOnOpenMPUpdateClause
OMPClause * ActOnOpenMPUpdateClause(OpenMPDependClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'update' clause.
Definition: SemaOpenMP.cpp:16099
clang::Sema::ActOnOpenMPDeclareMapperType
QualType ActOnOpenMPDeclareMapperType(SourceLocation TyLoc, TypeResult ParsedType)
Check if the specified type is allowed to be used in 'omp declare mapper' construct.
Definition: SemaOpenMP.cpp:21444
clang::Sema::getDefaultedFunctionKind
DefaultedFunctionKind getDefaultedFunctionKind(const FunctionDecl *FD)
Determine the kind of defaulting that would be done for a given function.
Definition: SemaDeclCXX.cpp:6527
clang::OverloadCandidateRewriteKind
OverloadCandidateRewriteKind
The kinds of rewrite we perform on overload candidates.
Definition: Overload.h:90
clang::Sema::FRS_DiagnosticIssued
@ FRS_DiagnosticIssued
Definition: Sema.h:4189
clang::Sema::GetNameForDeclarator
DeclarationNameInfo GetNameForDeclarator(Declarator &D)
GetNameForDeclarator - Determine the full declaration name for the given Declarator.
Definition: SemaDecl.cpp:5534
clang::Sema::TDK_DeducedMismatchNested
@ TDK_DeducedMismatchNested
After substituting deduced template arguments, an element of a dependent parameter type did not match...
Definition: Sema.h:8838
clang::Sema::IsFunctionConversion
bool IsFunctionConversion(QualType FromType, QualType ToType, QualType &ResultTy)
Determine whether the conversion from FromType to ToType is a valid conversion that strips "noexcept"...
Definition: SemaOverload.cpp:1521
clang::Sema::ReferenceCompareResult
ReferenceCompareResult
ReferenceCompareResult - Expresses the result of comparing two types (cv1 T1 and cv2 T2) to determine...
Definition: Sema.h:12389
clang::Sema::ReferenceConversionsScope::ObjCLifetime
@ ObjCLifetime
Definition: Sema.h:12412
clang::Sema::KernelNonConstStaticDataVariable
@ KernelNonConstStaticDataVariable
Definition: Sema.h:13682
clang::Sema::BuildCXXForRangeStmt
StmtResult BuildCXXForRangeStmt(SourceLocation ForLoc, SourceLocation CoawaitLoc, Stmt *InitStmt, SourceLocation ColonLoc, Stmt *RangeDecl, Stmt *Begin, Stmt *End, Expr *Cond, Expr *Inc, Stmt *LoopVarDecl, SourceLocation RParenLoc, BuildForRangeKind Kind)
BuildCXXForRangeStmt - Build or instantiate a C++11 for-range statement.
Definition: SemaStmt.cpp:2723
clang::Sema::SubstExpr
ExprResult SubstExpr(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:3569
clang::Sema::IsAllowedCUDACall
bool IsAllowedCUDACall(const FunctionDecl *Caller, const FunctionDecl *Callee)
Determines whether Caller may invoke Callee, based on their CUDA host/device attributes.
Definition: Sema.h:12861
clang::Sema::PerformContextualImplicitConversion
ExprResult PerformContextualImplicitConversion(SourceLocation Loc, Expr *FromE, ContextualImplicitConverter &Converter)
Perform a contextual implicit conversion.
Definition: SemaOverload.cpp:6103
clang::Sema::checkMSInheritanceAttrOnDefinition
bool checkMSInheritanceAttrOnDefinition(CXXRecordDecl *RD, SourceRange Range, bool BestCase, MSInheritanceModel SemanticSpelling)
clang::CallingConv
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Definition: Specifiers.h:263
clang::Sema::ActOnUsingEnumDeclaration
Decl * ActOnUsingEnumDeclaration(Scope *CurScope, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, const DeclSpec &)
Definition: SemaDeclCXX.cpp:11824
clang::Sema::ActOnOpenMPParallelForSimdDirective
StmtResult ActOnOpenMPParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10579
clang::Sema::TypeTagData::TypeTagData
TypeTagData()
Definition: Sema.h:13420
clang::Sema::PragmaClangTextSection
PragmaClangSection PragmaClangTextSection
Definition: Sema.h:652
clang::SYCLIntegrationHeader::updateKernelNames
void updateKernelNames(const FunctionDecl *SyclKernel, StringRef Name, StringRef StableName)
Update the names of a kernel description based on its SyclKernel.
Definition: Sema.h:353
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:875
clang::Sema::TypeTagData::Type
QualType Type
Definition: Sema.h:13427
clang::Sema::InstantiateDefaultArgument
bool InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
Definition: SemaTemplateInstantiateDecl.cpp:4867
clang::PreferredTypeBuilder::enterCondition
void enterCondition(Sema &S, SourceLocation Tok)
Definition: SemaCodeComplete.cpp:603
clang::Sema::DeduceReturnType
bool DeduceReturnType(FunctionDecl *FD, SourceLocation Loc, bool Diagnose=true)
Definition: SemaTemplateDeduction.cpp:4858
clang::Sema::ActOnPragmaRedefineExtname
void ActOnPragmaRedefineExtname(IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
ActOnPragmaRedefineExtname - Called on well formed #pragma redefine_extname oldname newname.
Definition: SemaDecl.cpp:18757
clang::LambdaCaptureInitKind
LambdaCaptureInitKind
Definition: DeclSpec.h:2659
clang::Sema::CapturedParamNameType
std::pair< StringRef, QualType > CapturedParamNameType
Definition: Sema.h:5140
clang::Sema::InstantiatingTemplate::~InstantiatingTemplate
~InstantiatingTemplate()
Definition: Sema.h:9445
clang::Sema::GlobalEagerInstantiationScope::perform
void perform()
Definition: Sema.h:9630
clang::Sema::CodeSynthesisContext::NestedRequirementConstraintsCheck
@ NestedRequirementConstraintsCheck
We are checking the satisfaction of a nested requirement of a requires expression.
Definition: Sema.h:9100
clang::Sema::ActOnOpenMPAllocatorClause
OMPClause * ActOnOpenMPAllocatorClause(Expr *Allocator, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'allocator' clause.
Definition: SemaOpenMP.cpp:15813
clang::Sema::NestedNameSpecInfo::Identifier
IdentifierInfo * Identifier
The identifier preceding the '::'.
Definition: Sema.h:6885
clang::Sema::LookupDestructorName
@ LookupDestructorName
Look up a name following ~ in a destructor name.
Definition: Sema.h:4320
clang::Sema::ImmediateDiagBuilder
Helper class that creates diagnostics with optional template instantiation stacks.
Definition: Sema.h:1818
clang::Sema::SkipBodyInfo
Definition: Sema.h:2680
AnalysisBasedWarnings.h
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3332
clang::Sema::ArithConvKind
ArithConvKind
Context in which we're performing a usual arithmetic conversion.
Definition: Sema.h:12084
clang::Sema::ParserCompletionContext
ParserCompletionContext
Describes the context in which code completion occurs.
Definition: Sema.h:12955
clang::Sema::ImplicitlyDefineFunction
NamedDecl * ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II, Scope *S)
ImplicitlyDefineFunction - An undeclared identifier was used in a function call, forming a call to an...
Definition: SemaDecl.cpp:15117
clang::Sema::getPrintable
static unsigned getPrintable(unsigned I)
Definition: Sema.h:2378
clang::SourceLocation::getHashValue
unsigned getHashValue() const
Definition: SourceLocation.cpp:53
clang::Sema::DefaultFunctionArrayLvalueConversion
ExprResult DefaultFunctionArrayLvalueConversion(Expr *E, bool Diagnose=true)
Definition: SemaExpr.cpp:777
clang::Sema::ActOnStaticAssertDeclaration
Decl * ActOnStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, Expr *AssertMessageExpr, SourceLocation RParenLoc)
Definition: SemaDeclCXX.cpp:16547
clang::Sema::deepTypeCheckForSYCLDevice
void deepTypeCheckForSYCLDevice(SourceLocation UsedAt, llvm::DenseSet< QualType > Visited, ValueDecl *DeclToCheck)
Definition: SemaSYCL.cpp:4044
clang::Sema::AlignPackInfo::operator==
bool operator==(const AlignPackInfo &Info) const
Definition: Sema.h:732
clang::Sema::diagnoseExprIntendedAsTemplateName
void diagnoseExprIntendedAsTemplateName(Scope *S, ExprResult TemplateName, SourceLocation Less, SourceLocation Greater)
Definition: SemaTemplate.cpp:616
clang::Sema::PCSK_Invalid
@ PCSK_Invalid
Definition: Sema.h:629
clang::Sema::isCUDAImplicitHostDeviceFunction
static bool isCUDAImplicitHostDeviceFunction(const FunctionDecl *D)
Definition: SemaCUDA.cpp:266
clang::Sema::LookupDestructor
CXXDestructorDecl * LookupDestructor(CXXRecordDecl *Class)
Look for the destructor of the given class.
Definition: SemaLookup.cpp:3436
clang::TemplateParameterList
Stores a list of template parameters for a TemplateDecl and its derived classes.
Definition: DeclTemplate.h:69
clang::Sema::ContextRAII::~ContextRAII
~ContextRAII()
Definition: Sema.h:1192
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1767
clang::Sema::ActOnObjCExceptionDecl
Decl * ActOnObjCExceptionDecl(Scope *S, Declarator &D)
Definition: SemaDeclObjC.cpp:5169
clang::Sema::ActOnOpenMPThreadprivateDirective
DeclGroupPtrTy ActOnOpenMPThreadprivateDirective(SourceLocation Loc, ArrayRef< Expr * > VarList)
Called on well-formed '#pragma omp threadprivate'.
Definition: SemaOpenMP.cpp:2935
clang::Sema::MarkCaptureUsedInEnclosingContext
void MarkCaptureUsedInEnclosingContext(VarDecl *Capture, SourceLocation Loc, unsigned CapturingScopeIndex)
Definition: SemaExpr.cpp:17862
clang::Sema::PendingImplicitInstantiation
std::pair< ValueDecl *, SourceLocation > PendingImplicitInstantiation
An entity for which implicit template instantiation is required.
Definition: Sema.h:9610
clang::Sema::AlignPackIncludeStack
SmallVector< AlignPackIncludeState, 8 > AlignPackIncludeStack
Definition: Sema.h:865
clang::Sema::ActOnOpenMPDynamicAllocatorsClause
OMPClause * ActOnOpenMPDynamicAllocatorsClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'dynamic_allocators' clause.
Definition: SemaOpenMP.cpp:16644
clang::Sema::MaybeBindToTemporary
ExprResult MaybeBindToTemporary(Expr *E)
MaybeBindToTemporary - If the passed in expression has a record type with a non-trivial destructor,...
Definition: SemaExprCXX.cpp:6986
clang::Sema::BuildOpenCLLoopUnrollHintAttr
OpenCLUnrollHintAttr * BuildOpenCLLoopUnrollHintAttr(const AttributeCommonInfo &A, Expr *E)
Definition: SemaStmtAttr.cpp:882
clang::Sema::DiagnoseAmbiguousLookup
void DiagnoseAmbiguousLookup(LookupResult &Result)
Produce a diagnostic describing the ambiguity that resulted from name lookup.
Definition: SemaLookup.cpp:2597
clang::ObjCTypeParamVariance
ObjCTypeParamVariance
Describes the variance of a given generic parameter.
Definition: DeclObjC.h:557
clang::Sema::ActOnCoyieldExpr
ExprResult ActOnCoyieldExpr(Scope *S, SourceLocation KwLoc, Expr *E)
Definition: SemaCoroutine.cpp:904
clang::Sema::SimplerImplicitMoveMode::ForceOff
@ ForceOff
clang::Sema::SpecialMemberOverloadResult::getMethod
CXXMethodDecl * getMethod() const
Definition: Sema.h:1562
clang::Sema::MaybeEmitAmbiguousAtomicConstraintsDiagnostic
bool MaybeEmitAmbiguousAtomicConstraintsDiagnostic(NamedDecl *D1, ArrayRef< const Expr * > AC1, NamedDecl *D2, ArrayRef< const Expr * > AC2)
If D1 was not at least as constrained as D2, but would've been if a pair of atomic constraints involv...
Definition: SemaConcept.cpp:1002
clang::Sema::TagUseKind
TagUseKind
Definition: Sema.h:3376
clang::Sema::CUDAVariableTarget
CUDAVariableTarget
Definition: Sema.h:12817
clang::CoroutineBodyStmt::CtorArgs
Definition: StmtCXX.h:346
clang::ObjCCategoryImplDecl
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
Definition: DeclObjC.h:2492
clang::Sema::isInOpenMPTaskUntiedContext
bool isInOpenMPTaskUntiedContext() const
Return true if currently in OpenMP task with untied clause context.
Definition: SemaOpenMP.cpp:2173
clang::Sema::OffsetOfComponent::U
union clang::Sema::OffsetOfComponent::@238 U
clang::Sema::ActOnOpenMPDefaultClause
OMPClause * ActOnOpenMPDefaultClause(llvm::omp::DefaultKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'default' clause.
Definition: SemaOpenMP.cpp:16007
clang::TypeDecl
Represents a declaration of a type.
Definition: Decl.h:3142
clang::Sema::CodeCompleteTypeQualifiers
void CodeCompleteTypeQualifiers(DeclSpec &DS)
Definition: SemaCodeComplete.cpp:5801
clang::Sema::OCK_Category
@ OCK_Category
Definition: Sema.h:9946
llvm::DenseSet
Definition: Sema.h:78
clang::Type::getAsCXXRecordDecl
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
Definition: Type.cpp:1760
clang::Sema::AA_Passing
@ AA_Passing
Definition: Sema.h:3748
clang::Sema::CheckRedeclarationInModule
bool CheckRedeclarationInModule(NamedDecl *New, NamedDecl *Old)
Definition: SemaDecl.cpp:1689
clang::Sema::MaybeCreateStmtWithCleanups
Stmt * MaybeCreateStmtWithCleanups(Stmt *SubStmt)
Definition: SemaExprCXX.cpp:7179
clang::tok::ObjCKeywordKind
ObjCKeywordKind
Provides a namespace for Objective-C keywords which start with an '@'.
Definition: TokenKinds.h:41
clang::Sema::ActOnSEHExceptBlock
StmtResult ActOnSEHExceptBlock(SourceLocation Loc, Expr *FilterExpr, Stmt *Block)
Definition: SemaStmt.cpp:4585
clang::Sema::ActOnOpenMPFlushClause
OMPClause * ActOnOpenMPFlushClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'flush' pseudo clause.
Definition: SemaOpenMP.cpp:19571
clang::Sema::WarnOnPendingNoDerefs
void WarnOnPendingNoDerefs(ExpressionEvaluationContextRecord &Rec)
Emit a warning for all pending noderef expressions that we recorded.
Definition: SemaExpr.cpp:17081
clang::Sema::LookupParsedName
bool LookupParsedName(LookupResult &R, Scope *S, CXXScopeSpec *SS, bool AllowBuiltinCreation=false, bool EnteringContext=false)
Performs name lookup for a name that was parsed in the source code, and may contain a C++ scope speci...
Definition: SemaLookup.cpp:2520
clang::Sema::isSelfExpr
bool isSelfExpr(Expr *RExpr)
Private Helper predicate to check for 'self'.
Definition: SemaExprObjC.cpp:1918
clang::Sema::ReferenceConversionsScope::Function
@ Function
Definition: Sema.h:12409
clang::Sema::TemplateNameIsRequired
@ TemplateNameIsRequired
Definition: Sema.h:7851
clang::Sema::BuildObjCStringLiteral
ExprResult BuildObjCStringLiteral(SourceLocation AtLoc, StringLiteral *S)
Definition: SemaExprObjC.cpp:81
clang::Sema::setOpenMPCaptureKind
void setOpenMPCaptureKind(FieldDecl *FD, const ValueDecl *D, unsigned Level)
Sets OpenMP capture kind (OMPC_private, OMPC_firstprivate, OMPC_map etc.) for FD based on DSA for the...
Definition: SemaOpenMP.cpp:2403
clang::Sema::BuildClassMessageImplicit
ExprResult BuildClassMessageImplicit(QualType ReceiverType, bool isSuperReceiver, SourceLocation Loc, Selector Sel, ObjCMethodDecl *Method, MultiExprArg Args)
Definition: SemaExprObjC.cpp:2433
clang::Sema::AddIntelReqdSubGroupSize
void AddIntelReqdSubGroupSize(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::ObjCMessageKind
ObjCMessageKind
Describes the kind of message expression indicated by a message send that starts with an identifier.
Definition: Sema.h:10218
clang::Sema::getLocForEndOfToken
SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset=0)
Calls Lexer::getLocForEndOfToken()
Definition: Sema.cpp:54
clang::Sema::CodeCompleteMemberReferenceExpr
void CodeCompleteMemberReferenceExpr(Scope *S, Expr *Base, Expr *OtherOpBase, SourceLocation OpLoc, bool IsArrow, bool IsBaseExprStatement, QualType PreferredType)
Definition: SemaCodeComplete.cpp:5555
clang::Sema::CXXThisScopeRAII::~CXXThisScopeRAII
~CXXThisScopeRAII()
Definition: SemaExprCXX.cpp:1244
clang::Sema::DeviceDiagnosticReason
DeviceDiagnosticReason
Bitmask to contain the list of reasons a single diagnostic should be emitted, based on its language.
Definition: Sema.h:1878
clang::Sema::PCC_ForInit
@ PCC_ForInit
Code completion occurs at the beginning of the initialization statement (or expression) in a for loop...
Definition: Sema.h:12982
clang::Sema::ActOnStartExportDecl
Decl * ActOnStartExportDecl(Scope *S, SourceLocation ExportLoc, SourceLocation LBraceLoc)
We have parsed the start of an export declaration, including the '{' (if present).
Definition: SemaModule.cpp:679
clang::Sema::ActOnOpenMPDeclareTargetName
void ActOnOpenMPDeclareTargetName(NamedDecl *ND, SourceLocation Loc, OMPDeclareTargetDeclAttr::MapTypeTy MT, DeclareTargetContextInfo &DTCI)
Called on correct id-expression from the '#pragma omp declare target'.
Definition: SemaOpenMP.cpp:21979
clang::Sema::PragmaAttributeEntry::Attribute
ParsedAttr * Attribute
Definition: Sema.h:910
clang::Sema::BuildTypeofExprType
QualType BuildTypeofExprType(Expr *E)
Definition: SemaType.cpp:9075
clang::Sema::DeduceTemplateArguments
TemplateDeductionResult DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial, const TemplateArgumentList &TemplateArgs, sema::TemplateDeductionInfo &Info)
Perform template argument deduction to determine whether the given template arguments match the given...
Definition: SemaTemplateDeduction.cpp:2940
clang::OpenCLOptions
OpenCL supported extensions and optional core features.
Definition: OpenCLOptions.h:69
clang::Sema::ActOnForwardClassDeclaration
DeclGroupPtrTy ActOnForwardClassDeclaration(SourceLocation Loc, IdentifierInfo **IdentList, SourceLocation *IdentLocs, ArrayRef< ObjCTypeParamList * > TypeParamLists, unsigned NumElts)
Definition: SemaDeclObjC.cpp:3047
clang::Sema::NTCUC_AutoVar
@ NTCUC_AutoVar
Definition: Sema.h:3096
clang::Sema::VAK_MSVCUndefined
@ VAK_MSVCUndefined
Definition: Sema.h:12042
clang::Sema::TUK_Declaration
@ TUK_Declaration
Definition: Sema.h:3378
clang::Sema::getCurFPFeatures
FPOptions & getCurFPFeatures()
Definition: Sema.h:1776
clang::Sema::DeviceDiagnosticReason::CudaHost
@ CudaHost
clang::EnumConstantDecl
An instance of this object exists for each enum constant that is defined.
Definition: Decl.h:3054
clang::Sema::checkTypeSupport
void checkTypeSupport(QualType Ty, SourceLocation Loc, ValueDecl *D=nullptr)
Check if the type is allowed to be used for the current target.
Definition: Sema.cpp:1984
clang::Sema::TDK_NonDeducedMismatch
@ TDK_NonDeducedMismatch
A non-depnedent component of the parameter did not match the corresponding component of the argument.
Definition: Sema.h:8841
clang::Sema::FindDeallocationFunctionForDestructor
FunctionDecl * FindDeallocationFunctionForDestructor(SourceLocation StartLoc, CXXRecordDecl *RD)
Definition: SemaExprCXX.cpp:3165
clang::Sema::PragmaStackSentinelRAII::~PragmaStackSentinelRAII
~PragmaStackSentinelRAII()
Definition: SemaAttr.cpp:40
clang::Sema::getInventedParameterInfos
ArrayRef< InventedTemplateParameterInfo > getInventedParameterInfos() const
Definition: Sema.h:983
clang::Sema::BuildBuiltinBitCastExpr
ExprResult BuildBuiltinBitCastExpr(SourceLocation KWLoc, TypeSourceInfo *TSI, Expr *Operand, SourceLocation RParenLoc)
Definition: SemaCast.cpp:395
clang::Sema::ActOnOpenMPLoopnest
StmtResult ActOnOpenMPLoopnest(Stmt *AStmt)
Process a canonical OpenMP loop nest that can either be a canonical literal loop (ForStmt or CXXForRa...
Definition: SemaOpenMP.cpp:5683
clang::Sema::CheckMicrosoftIfExistsSymbol
IfExistsResult CheckMicrosoftIfExistsSymbol(Scope *S, CXXScopeSpec &SS, const DeclarationNameInfo &TargetNameInfo)
Definition: SemaExprCXX.cpp:8706
clang::CXXTryStmt
CXXTryStmt - A C++ try block, including all handlers.
Definition: StmtCXX.h:68
clang::Sema::CompleteTypeKind
CompleteTypeKind
Definition: Sema.h:2446
clang::ParsedType
OpaquePtr< QualType > ParsedType
An opaque type for threading parsed type information through the parser.
Definition: Ownership.h:243
clang::Sema::OMPIteratorData::SecColonLoc
SourceLocation SecColonLoc
Definition: Sema.h:5725
clang::Sema::CFError
RecordDecl * CFError
The struct behind the CFErrorRef pointer.
Definition: Sema.h:13488
ExprObjC.h
clang::Sema::CheckInheritingConstructorUsingDecl
bool CheckInheritingConstructorUsingDecl(UsingDecl *UD)
Additional checks for a using declaration referring to a constructor name.
Definition: SemaDeclCXX.cpp:12607
clang::NestedNameSpecifierLoc
A C++ nested-name-specifier augmented with source location information.
Definition: NestedNameSpecifier.h:243
clang::Sema::ActOnMSVCUnknownTypeName
ParsedType ActOnMSVCUnknownTypeName(const IdentifierInfo &II, SourceLocation NameLoc, bool IsTemplateTypeArg)
Attempt to behave like MSVC in situations where lookup of an unqualified type name has failed in a de...
Definition: SemaDecl.cpp:578
clang::Sema::DiagnoseEmptyStmtBody
void DiagnoseEmptyStmtBody(SourceLocation StmtLoc, const Stmt *Body, unsigned DiagID)
Emit DiagID if statement located on StmtLoc has a suspicious null statement as a Body,...
Definition: SemaChecking.cpp:16416
clang::Sema::CheckShiftOperands
QualType CheckShiftOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc, bool IsCompAssign=false)
Definition: SemaExpr.cpp:11532
clang::Sema::AlignPackInfo::operator!=
bool operator!=(const AlignPackInfo &Info) const
Definition: Sema.h:738
clang::Sema::ActOnObjCForCollectionStmt
StmtResult ActOnObjCForCollectionStmt(SourceLocation ForColLoc, Stmt *First, Expr *collection, SourceLocation RParenLoc)
Definition: SemaStmt.cpp:2274
clang::Sema::TentativeAnalysisScope
RAII class used to indicate that we are performing provisional semantic analysis to determine the val...
Definition: Sema.h:9563
clang::Sema::MergeVarDeclTypes
void MergeVarDeclTypes(VarDecl *New, VarDecl *Old, bool MergeTypeWithOld)
MergeVarDeclTypes - We parsed a variable 'New' which has the same name and scope as a previous declar...
Definition: SemaDecl.cpp:4123
clang::Sema::PureVirtualClassDiagSet
std::unique_ptr< RecordDeclSetTy > PureVirtualClassDiagSet
PureVirtualClassDiagSet - a set of class declarations which we have emitted a list of pure virtual fu...
Definition: Sema.h:1024
clang::Sema::ActOnOpenMPPrivateClause
OMPClause * ActOnOpenMPPrivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'private' clause.
Definition: SemaOpenMP.cpp:17117
clang::Sema::ExpressionEvaluationContextRecord::NumCleanupObjects
unsigned NumCleanupObjects
The number of active cleanup objects when we entered this expression evaluation context.
Definition: Sema.h:1441
ExprCXX.h
clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext
EnterExpressionEvaluationContext(Sema &Actions, InitListTag, bool ShouldEnter=true)
Definition: Sema.h:13819
clang::Sema::ActOnOpenMPTargetTeamsGenericLoopDirective
StmtResult ActOnOpenMPTargetTeamsGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10278
clang::Sema::NonTrivialCUnionKind
NonTrivialCUnionKind
Definition: Sema.h:3116
clang::Sema::AddIntelFPGAPrivateCopiesAttr
void AddIntelFPGAPrivateCopiesAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::ActOnStartDelayedMemberDeclarations
void ActOnStartDelayedMemberDeclarations(Scope *S, Decl *Record)
Definition: SemaDeclCXX.cpp:10349
clang::Sema::isValidSveBitcast
bool isValidSveBitcast(QualType srcType, QualType destType)
Are the two types SVE-bitcast-compatible types? I.e.
Definition: SemaExpr.cpp:7687
clang::Sema::ActOnTagTemplateIdType
TypeResult ActOnTagTemplateIdType(TagUseKind TUK, TypeSpecifierType TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy TemplateD, SourceLocation TemplateLoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgsIn, SourceLocation RAngleLoc)
Parsed an elaborated-type-specifier that refers to a template-id, such as class T::template apply.
Definition: SemaTemplate.cpp:4009
clang::Sema::isTagName
TypeSpecifierType isTagName(IdentifierInfo &II, Scope *S)
isTagName() - This method is called for error recovery purposes only to determine if the specified na...
Definition: SemaDecl.cpp:631
Base
clang::Sema::AddMethodTemplateCandidate
void AddMethodTemplateCandidate(FunctionTemplateDecl *MethodTmpl, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, TemplateArgumentListInfo *ExplicitTemplateArgs, QualType ObjectType, Expr::Classification ObjectClassification, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, OverloadCandidateParamOrder PO={})
Add a C++ member function template as a candidate to the candidate set, using template argument deduc...
Definition: SemaOverload.cpp:7071
clang::Sema::CUDADiagIfHostCode
SemaDiagnosticBuilder CUDADiagIfHostCode(SourceLocation Loc, unsigned DiagID)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as host cod...
Definition: SemaCUDA.cpp:759
clang::Sema::checkExceptionSpecification
void checkExceptionSpecification(bool IsTopLevel, ExceptionSpecificationType EST, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr, SmallVectorImpl< QualType > &Exceptions, FunctionProtoType::ExceptionSpecInfo &ESI)
Check the given exception-specification and update the exception specification information with the r...
Definition: SemaDeclCXX.cpp:18164
clang::ASTWriter
Writes an AST file containing the contents of a translation unit.
Definition: ASTWriter.h:83
clang::Sema::TryImplicitConversion
ImplicitConversionSequence TryImplicitConversion(Expr *From, QualType ToType, bool SuppressUserConversions, AllowedExplicit AllowExplicit, bool InOverloadResolution, bool CStyle, bool AllowObjCWritebackConversion)
Definition: SemaOverload.cpp:1478
clang::Sema::CheckCXXBooleanCondition
ExprResult CheckCXXBooleanCondition(Expr *CondExpr, bool IsConstexpr=false)
CheckCXXBooleanCondition - Returns true if conversion to bool is invalid.
Definition: SemaExprCXX.cpp:3963
clang::Sema::RetainOwnershipKind::CF
@ CF
clang::Sema::getObjCDeclContext
Decl * getObjCDeclContext() const
Definition: SemaDecl.cpp:18814
Label
std::string Label
Definition: UsingDeclarationsSorter.cpp:69
clang::Sema::BuildInstanceMessage
ExprResult BuildInstanceMessage(Expr *Receiver, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C instance message expression.
Definition: SemaExprObjC.cpp:2839
clang::Sema::ActOnOpenMPDistributeSimdDirective
StmtResult ActOnOpenMPDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13350
clang::Sema::DelayedDiagnostics::popWithoutEmitting
void popWithoutEmitting(DelayedDiagnosticsState state)
Leave a delayed-diagnostic state that was previously pushed.
Definition: Sema.h:1135
clang::Sema::TDK_TooManyArguments
@ TDK_TooManyArguments
When performing template argument deduction for a function template, there were too many call argumen...
Definition: Sema.h:8844
clang::Sema::ActOnOpenMPDeclareReductionDirectiveStart
DeclGroupPtrTy ActOnOpenMPDeclareReductionDirectiveStart(Scope *S, DeclContext *DC, DeclarationName Name, ArrayRef< std::pair< QualType, SourceLocation >> ReductionTypes, AccessSpecifier AS, Decl *PrevDeclInScope=nullptr)
Called on start of '#pragma omp declare reduction'.
Definition: SemaOpenMP.cpp:21205
clang::Sema::OriginalLexicalContext
DeclContext * OriginalLexicalContext
Generally null except when we temporarily switch decl contexts, like in.
Definition: Sema.h:603
clang::Sema::canThrow
CanThrowResult canThrow(const Stmt *E)
Definition: SemaExceptionSpec.cpp:1124
clang::Sema::CFP_HostDevice
@ CFP_HostDevice
Definition: Sema.h:12840
clang::Sema::ActOnOpenMPUnifiedAddressClause
OMPClause * ActOnOpenMPUnifiedAddressClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'unified_address' clause.
Definition: SemaOpenMP.cpp:16629
clang::Sema::ActOnOpenMPAllocateDirective
DeclGroupPtrTy ActOnOpenMPAllocateDirective(SourceLocation Loc, ArrayRef< Expr * > VarList, ArrayRef< OMPClause * > Clauses, DeclContext *Owner=nullptr)
Called on well-formed '#pragma omp allocate'.
Definition: SemaOpenMP.cpp:3154
clang::Sema::getDefaultCXXMethodAddrSpace
LangAS getDefaultCXXMethodAddrSpace() const
Returns default addr space for method qualifiers.
Definition: Sema.cpp:1512
clang::Sema::getNSErrorIdent
IdentifierInfo * getNSErrorIdent()
Retrieve the identifier "NSError".
Definition: SemaType.cpp:4039
clang::Sema::ConditionKind::ConstexprIf
@ ConstexprIf
A constant boolean condition from 'if constexpr'.
clang::OpenMPDependClauseKind
OpenMPDependClauseKind
OpenMP attributes for 'depend' clause.
Definition: OpenMPKinds.h:54
clang::Sema::DiagnoseAvailabilityOfDecl
void DiagnoseAvailabilityOfDecl(NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass, bool ObjCPropertyAccess, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReceiver=nullptr)
Definition: SemaAvailability.cpp:919
clang::Sema::PCC_Expression
@ PCC_Expression
Code completion occurs within an expression.
Definition: Sema.h:12976
clang::Sema::CodeCompleteLambdaIntroducer
void CodeCompleteLambdaIntroducer(Scope *S, LambdaIntroducer &Intro, bool AfterAmpersand)
Definition: SemaCodeComplete.cpp:6854
clang::Sema::OriginalCallArg::OriginalCallArg
OriginalCallArg(QualType OriginalParamType, bool DecomposedParam, unsigned ArgIdx, QualType OriginalArgType)
Definition: Sema.h:8882
clang::Sema::BuildCXXNestedNameSpecifier
bool BuildCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, NamedDecl *ScopeLookupResult, bool ErrorRecoveryLookup, bool *IsCorrectedToColon=nullptr, bool OnlyNamespace=false)
Build a new nested-name-specifier for "identifier::", as described by ActOnCXXNestedNameSpecifier.
Definition: SemaCXXScopeSpec.cpp:497
clang::Sema::BuildUsingShadowDecl
UsingShadowDecl * BuildUsingShadowDecl(Scope *S, BaseUsingDecl *BUD, NamedDecl *Target, UsingShadowDecl *PrevDecl)
Builds a shadow declaration corresponding to a 'using' declaration.
Definition: SemaDeclCXX.cpp:12065
clang::Sema::DefaultedComparisonKind::ThreeWay
@ ThreeWay
This is an operator<=> that should be implemented as a series of subobject comparisons.
clang::Sema::ActOnOpenMPMetaDirective
StmtResult ActOnOpenMPMetaDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp metadirective' after parsing of the associated statement.
clang::Sema::CCEK_CaseValue
@ CCEK_CaseValue
Expression in a case label.
Definition: Sema.h:3863
clang::Sema::ActOnFinishedOpenMPDeclareTargetContext
void ActOnFinishedOpenMPDeclareTargetContext(DeclareTargetContextInfo &DTCI)
Called once a target context is completed, that can be when a '#pragma omp end declare target' was en...
Definition: SemaOpenMP.cpp:21939
clang::Sema::TAH_ConsiderTrivialABI
@ TAH_ConsiderTrivialABI
The triviality of a method affected by "trivial_abi".
Definition: Sema.h:3442
clang::Sema::DefaultedComparisonKind::NotEqual
@ NotEqual
This is an operator!= that should be implemented as a rewrite in terms of a == comparison.
clang::Sema::TPC_FunctionTemplate
@ TPC_FunctionTemplate
Definition: Sema.h:8000
clang::Sema::NSNumberDecl
ObjCInterfaceDecl * NSNumberDecl
The declaration of the Objective-C NSNumber class.
Definition: Sema.h:1328
clang::AtomicExpr::AtomicOp
AtomicOp
Definition: Expr.h:6289
ASTConcept.h
This file provides AST data structures related to concepts.
clang::Sema::AddXConsumedAttr
void AddXConsumedAttr(Decl *D, const AttributeCommonInfo &CI, RetainOwnershipKind K, bool IsTemplateInstantiation)
clang::Sema::LK_String
@ LK_String
Definition: Sema.h:3968
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::FDBaseInfo
DenseMapInfo< clang::CanonicalDeclPtr< clang::FunctionDecl > > FDBaseInfo
Definition: Sema.h:13865
clang::Sema::isVisible
bool isVisible(const NamedDecl *D)
Determine whether a declaration is visible to name lookup.
Definition: Sema.h:2535
clang::Sema::CodeCompleteModuleImport
void CodeCompleteModuleImport(SourceLocation ImportLoc, ModuleIdPath Path)
Definition: SemaCodeComplete.cpp:4239
clang::Sema::ActOnIvar
Decl * ActOnIvar(Scope *S, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, tok::ObjCKeywordKind visibility)
ActOnIvar - Each ivar field of an objective-c class is passed into this in order to create an IvarDec...
Definition: SemaDecl.cpp:17415
clang::Sema::ResolveExceptionSpec
const FunctionProtoType * ResolveExceptionSpec(SourceLocation Loc, const FunctionProtoType *FPT)
Definition: SemaExceptionSpec.cpp:209
clang::Sema::InstantiatingTemplate::ConstraintNormalization
Definition: Sema.h:9416
clang::Sema::diagnoseMissingImport
void diagnoseMissingImport(SourceLocation Loc, NamedDecl *Decl, MissingImportKind MIK, bool Recover=true)
Diagnose that the specified declaration needs to be visible but isn't, and suggest a module import th...
Definition: SemaLookup.cpp:5424
clang::Sema::ContextualImplicitConverter::match
virtual bool match(QualType T)=0
Determine whether the specified type is a valid destination type for this conversion.
clang::Sema::BuildQualifiedTemplateIdExpr
ExprResult BuildQualifiedTemplateIdExpr(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaTemplate.cpp:4774
clang::Sema::ActOnOpenMPTileDirective
StmtResult ActOnOpenMPTileDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp tile' after parsing of its clauses and the associated statement.
Definition: SemaOpenMP.cpp:14028
clang::IdentifierResolver
IdentifierResolver - Keeps track of shadowed decls on enclosing scopes.
Definition: IdentifierResolver.h:38
clang::Sema::CodeCompleteObjCImplementationCategory
void CodeCompleteObjCImplementationCategory(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
Definition: SemaCodeComplete.cpp:8442
clang::Sema::CodeCompleteDesignator
void CodeCompleteDesignator(const QualType BaseType, llvm::ArrayRef< Expr * > InitExprs, const Designation &D)
Trigger code completion for a record of BaseType.
Definition: SemaCodeComplete.cpp:6339
clang::Sema::ExpressionEvaluationContextRecord::ManglingContextDecl
Decl * ManglingContextDecl
The declaration that provides context for lambda expressions and block literals if the normal declara...
Definition: Sema.h:1456
clang::Sema::TPC_FriendClassTemplate
@ TPC_FriendClassTemplate
Definition: Sema.h:8002
clang::Sema::CodeCompleteObjCPropertySynthesizeIvar
void CodeCompleteObjCPropertySynthesizeIvar(Scope *S, IdentifierInfo *PropertyName)
Definition: SemaCodeComplete.cpp:8520
clang::Sema::TemplateNameKindForDiagnostics::TemplateTemplateParam
@ TemplateTemplateParam
clang::Sema::InstantiateFunctionDefinition
void InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, FunctionDecl *Function, bool Recursive=false, bool DefinitionRequired=false, bool AtEndOfTU=false)
Instantiate the definition of the given function from its template.
Definition: SemaTemplateInstantiateDecl.cpp:5178
clang::Sema::IsValueInFlagEnum
bool IsValueInFlagEnum(const EnumDecl *ED, const llvm::APInt &Val, bool AllowMask) const
IsValueInFlagEnum - Determine if a value is allowed as part of a flag enum.
Definition: SemaDecl.cpp:18489
clang::Sema::FindCompositePointerType
QualType FindCompositePointerType(SourceLocation Loc, ExprResult &E1, ExprResult &E2, bool ConvertArgs=true)
Definition: Sema.h:12328
clang::Sema::BuildExtVectorType
QualType BuildExtVectorType(QualType T, Expr *ArraySize, SourceLocation AttrLoc)
Build an ext-vector type.
Definition: SemaType.cpp:2667
clang::Sema::ActOnNoexceptSpec
ExprResult ActOnNoexceptSpec(Expr *NoexceptExpr, ExceptionSpecificationType &EST)
Check the given noexcept-specifier, convert its expression, and compute the appropriate ExceptionSpec...
Definition: SemaExceptionSpec.cpp:81
clang::Sema::DiagnoseFunctionSpecifiers
void DiagnoseFunctionSpecifiers(const DeclSpec &DS)
Diagnose function specifiers on a declaration of an identifier that does not identify a function.
Definition: SemaDecl.cpp:6334
clang::Sema::AddIntelFPGABankWidthAttr
void AddIntelFPGABankWidthAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::BuildAtomicExpr
ExprResult BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, SourceLocation RParenLoc, MultiExprArg Args, AtomicExpr::AtomicOp Op, AtomicArgumentOrder ArgOrder=AtomicArgumentOrder::API)
Definition: SemaChecking.cpp:5768
clang::Sema::AddSYCLIntelFPGAMaxConcurrencyAttr
void AddSYCLIntelFPGAMaxConcurrencyAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
AddSYCLIntelFPGAMaxConcurrencyAttr - Adds a max_concurrency attribute to a particular declaration.
clang::Sema::CheckAltivecInitFromScalar
bool CheckAltivecInitFromScalar(SourceRange R, QualType VecTy, QualType SrcTy)
Definition: SemaCast.cpp:2653
clang::Sema::ActOnExitFunctionContext
void ActOnExitFunctionContext()
Definition: SemaDecl.cpp:1455
clang::Sema::ExpressionEvaluationContextRecord::DelayedDecltypeCalls
SmallVector< CallExpr *, 8 > DelayedDecltypeCalls
If we are processing a decltype type, a set of call expressions for which we have deferred checking t...
Definition: Sema.h:1460
clang::Sema::getCurObjCLexicalContext
const DeclContext * getCurObjCLexicalContext() const
Definition: Sema.h:13517
clang::Sema::CheckCXXDefaultArgExpr
bool CheckCXXDefaultArgExpr(SourceLocation CallLoc, FunctionDecl *FD, ParmVarDecl *Param)
Instantiate or parse a C++ default argument expression as necessary.
Definition: SemaExpr.cpp:5867
clang::Sema::PerformOpenMPImplicitIntegerConversion
ExprResult PerformOpenMPImplicitIntegerConversion(SourceLocation OpLoc, Expr *Op)
Definition: SemaOpenMP.cpp:15582
clang::Sema::checkStringLiteralArgumentAttr
bool checkStringLiteralArgumentAttr(const AttributeCommonInfo &CI, const Expr *E, StringRef &Str, SourceLocation *ArgLocation=nullptr)
clang::Sema::LOLR_Template
@ LOLR_Template
The lookup found an overload set of literal operator templates, which expect the characters of the sp...
Definition: Sema.h:4394
clang::Sema::PragmaStack::Slot::Slot
Slot(llvm::StringRef StackSlotLabel, ValueType Value, SourceLocation PragmaLocation, SourceLocation PragmaPushLocation)
Definition: Sema.h:773
clang::Sema::InstantiatingSpecializations
llvm::DenseSet< std::pair< Decl *, unsigned > > InstantiatingSpecializations
Specializations whose definitions are currently being instantiated.
Definition: Sema.h:9205
clang::Sema::diagnoseIgnoredQualifiers
void diagnoseIgnoredQualifiers(unsigned DiagID, unsigned Quals, SourceLocation FallbackLoc, SourceLocation ConstQualLoc=SourceLocation(), SourceLocation VolatileQualLoc=SourceLocation(), SourceLocation RestrictQualLoc=SourceLocation(), SourceLocation AtomicQualLoc=SourceLocation(), SourceLocation UnalignedQualLoc=SourceLocation())
Definition: SemaType.cpp:3140
x
IRgen optimization opportunities The common pattern of short x
Definition: README.txt:7
clang::Sema::getASTMutationListener
ASTMutationListener * getASTMutationListener() const
Definition: Sema.cpp:575
clang::Sema::DeclareImplicitDeductionGuides
void DeclareImplicitDeductionGuides(TemplateDecl *Template, SourceLocation Loc)
Declare implicit deduction guides for a class template if we've not already done so.
Definition: SemaTemplate.cpp:2463
clang::Sema::AMK_Redeclaration
@ AMK_Redeclaration
Merge availability attributes for a redeclaration, which requires an exact match.
Definition: Sema.h:3641
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1179
clang::Sema::ActOnObjCAtFinallyStmt
StmtResult ActOnObjCAtFinallyStmt(SourceLocation AtLoc, Stmt *Body)
Definition: SemaStmt.cpp:4209
clang::Sema::MaybeSuggestAddingStaticToDecl
void MaybeSuggestAddingStaticToDecl(const FunctionDecl *D)
Definition: SemaExpr.cpp:194
clang::Sema::ActOnCoreturnStmt
StmtResult ActOnCoreturnStmt(Scope *S, SourceLocation KwLoc, Expr *E)
Definition: SemaCoroutine.cpp:959
clang::Sema::ActOnOpenMPLinearClause
OMPClause * ActOnOpenMPLinearClause(ArrayRef< Expr * > VarList, Expr *Step, SourceLocation StartLoc, SourceLocation LParenLoc, OpenMPLinearClauseKind LinKind, SourceLocation LinLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'linear' clause.
Definition: SemaOpenMP.cpp:19054
clang::Sema::ActOnOpenMPNocontextClause
OMPClause * ActOnOpenMPNocontextClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'nocontext' clause.
Definition: SemaOpenMP.cpp:16863
clang::Sema::CheckAllocatedType
bool CheckAllocatedType(QualType AllocType, SourceLocation Loc, SourceRange R)
Checks that a type is suitable as the allocated type in a new-expression.
Definition: SemaExprCXX.cpp:2431
clang::Sema::DiagnoseUnexpandedParameterPacks
bool DiagnoseUnexpandedParameterPacks(SourceLocation Loc, UnexpandedParameterPackContext UPPC, ArrayRef< UnexpandedParameterPack > Unexpanded)
Diagnose unexpanded parameter packs.
Definition: SemaTemplateVariadic.cpp:290
clang::Sema::DelayedDiagnostics::shouldDelayDiagnostics
bool shouldDelayDiagnostics()
Determines whether diagnostics should be delayed.
Definition: Sema.h:1116
clang::Sema::LookupName
bool LookupName(LookupResult &R, Scope *S, bool AllowBuiltinCreation=false)
Perform unqualified name lookup starting from a given scope.
Definition: SemaLookup.cpp:1985
clang::ObjCMessageExpr
An expression that sends a message to the given Objective-C object or class.
Definition: ExprObjC.h:940
clang::Sema::checkLiteralOperatorId
bool checkLiteralOperatorId(const CXXScopeSpec &SS, const UnqualifiedId &Id, bool IsUDSuffix)
Definition: SemaExprCXX.cpp:486
clang::Sema::CheckQualifiedFunctionForTypeId
bool CheckQualifiedFunctionForTypeId(QualType T, SourceLocation Loc)
Definition: SemaType.cpp:2105
clang::Sema::CodeSynthesisContext::SpecialMember
CXXSpecialMember SpecialMember
The special member being declared or defined.
Definition: Sema.h:9170
clang::Sema::NamedReturnInfo
Definition: Sema.h:5151
clang::Sema::NameClassification::FunctionTemplate
static NameClassification FunctionTemplate(TemplateName Name)
Definition: Sema.h:2818
clang::Sema::actOnDelayedExceptionSpecification
void actOnDelayedExceptionSpecification(Decl *Method, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr)
Add an exception-specification to the given member function (or member function template).
Definition: SemaDeclCXX.cpp:18213
clang::Sema::mergeEnforceTCBAttr
EnforceTCBAttr * mergeEnforceTCBAttr(Decl *D, const EnforceTCBAttr &AL)
clang::Sema::getOpenMPCapturedExpr
ExprResult getOpenMPCapturedExpr(VarDecl *Capture, ExprValueKind VK, ExprObjectKind OK, SourceLocation Loc)
Definition: SemaOpenMP.cpp:17098
clang::Sema::CodeCompleteNaturalLanguage
void CodeCompleteNaturalLanguage()
Definition: SemaCodeComplete.cpp:9991
clang::Sema::PragmaClangSectionAction
PragmaClangSectionAction
Definition: Sema.h:637
clang::Sema::ImplMethodsVsClassMethods
void ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl *IMPDecl, ObjCContainerDecl *IDecl, bool IncompleteImpl=false)
ImplMethodsVsClassMethods - This is main routine to warn if any method remains unimplemented in the c...
Definition: SemaDeclObjC.cpp:2968
clang::Sema::BuildMemberExpr
MemberExpr * BuildMemberExpr(Expr *Base, bool IsArrow, SourceLocation OpLoc, const CXXScopeSpec *SS, SourceLocation TemplateKWLoc, ValueDecl *Member, DeclAccessPair FoundDecl, bool HadMultipleCandidates, const DeclarationNameInfo &MemberNameInfo, QualType Ty, ExprValueKind VK, ExprObjectKind OK, const TemplateArgumentListInfo *TemplateArgs=nullptr)
Definition: SemaExprMember.cpp:895
clang::Sema::getOpenCLOptions
OpenCLOptions & getOpenCLOptions()
Definition: Sema.h:1775
clang::Sema::ActOnUnaryExprOrTypeTraitExpr
ExprResult ActOnUnaryExprOrTypeTraitExpr(SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, bool IsType, void *TyOrEx, SourceRange ArgRange)
ActOnUnaryExprOrTypeTraitExpr - Handle sizeof(type) and sizeof expr and the same for alignof and __al...
Definition: SemaExpr.cpp:4722
clang::sema::SemaPPCallbacks
Definition: Sema.cpp:131
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::getTombstoneKey
static FunctionDeclAndLoc getTombstoneKey()
Definition: Sema.h:13871
clang::Sema::MaybeConvertParenListExprToParenExpr
ExprResult MaybeConvertParenListExprToParenExpr(Scope *S, Expr *ME)
This is not an AltiVec-style cast or or C++ direct-initialization, so turn the ParenListExpr into a s...
Definition: SemaExpr.cpp:8054
clang::Sema::CorrectDelayedTyposInExpr
ExprResult CorrectDelayedTyposInExpr(ExprResult ER, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
Definition: Sema.h:4590
clang::OverloadedOperatorKind
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
Definition: OperatorKinds.h:21
clang::Sema::SemaDiagnosticBuilder::operator<<
const friend SemaDiagnosticBuilder & operator<<(const SemaDiagnosticBuilder &Diag, const T &Value)
Definition: Sema.h:1979
clang::Sema::PoppedFunctionScopeDeleter
Custom deleter to allow FunctionScopeInfos to be kept alive for a short time after they've been poppe...
Definition: Sema.h:2147
clang::Decl::getOwningModule
Module * getOwningModule() const
Get the module that owns this declaration (for visibility purposes).
Definition: DeclBase.h:781
clang::Sema::CCK_ImplicitConversion
@ CCK_ImplicitConversion
An implicit conversion.
Definition: Sema.h:11956
clang::Sema::addExternalSource
void addExternalSource(ExternalSemaSource *E)
Registers an external source.
Definition: Sema.cpp:584
clang::Sema::AA_Returning
@ AA_Returning
Definition: Sema.h:3749
clang::Sema::IncompatiblePointerSign
@ IncompatiblePointerSign
IncompatiblePointerSign - The assignment is between two pointers types which point to integers which ...
Definition: Sema.h:12139
clang::Sema::TryCapture_ExplicitByVal
@ TryCapture_ExplicitByVal
Definition: Sema.h:5400
clang::Sema::ConditionResult
Definition: Sema.h:12527
clang::Sema::AMK_OptionalProtocolImplementation
@ AMK_OptionalProtocolImplementation
Merge availability attributes for an implementation of an optional protocol requirement.
Definition: Sema.h:3650
clang::Sema::FullExprArg::FullExprArg
FullExprArg(Sema &actions)
Definition: Sema.h:4965
clang::Sema::BuildObjCSubscriptExpression
ExprResult BuildObjCSubscriptExpression(SourceLocation RB, Expr *BaseExpr, Expr *IndexExpr, ObjCMethodDecl *getterMethod, ObjCMethodDecl *setterMethod)
Build an ObjC subscript pseudo-object expression, given that that's supported by the runtime.
Definition: SemaExprObjC.cpp:763
clang::Sema::PopExpressionEvaluationContext
void PopExpressionEvaluationContext()
Definition: SemaExpr.cpp:17300
clang::Sema::AlignPackInfo::Natural
@ Natural
Definition: Sema.h:669
clang::SYCLIntegrationFooter::emit
bool emit(StringRef MainSrc)
Definition: SemaSYCL.cpp:4887
clang::Sema::ActOnOpenMPEndDeclareTargetDirective
const DeclareTargetContextInfo ActOnOpenMPEndDeclareTargetDirective()
Called at the end of target region i.e. '#pragma omp end declare target'.
Definition: SemaOpenMP.cpp:21933
state
and static some checkers Checker The latter are built on top of the former via the Checker and CheckerVisitor and attempts to isolate them from much of the gore of the internal analysis the analyzer is basically a source code simulator that traces out possible paths of execution The state of the and the combination of state and program point is a node in an exploded which has the entry program point and initial state
Definition: README.txt:30
clang::Sema::SynthesizedFunctionScope
RAII object to handle the state changes required to synthesize a function body.
Definition: Sema.h:1213
clang::Sema::ActOnDeclStmt
StmtResult ActOnDeclStmt(DeclGroupPtrTy Decl, SourceLocation StartLoc, SourceLocation EndLoc)
Definition: SemaStmt.cpp:73
clang::Sema::LookupNameKind
LookupNameKind
Describes the kind of name lookup to perform.
Definition: Sema.h:4301
clang::Sema::BuildStaticAssertDeclaration
Decl * BuildStaticAssertDeclaration(SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *AssertMessageExpr, SourceLocation RParenLoc, bool Failed)
Definition: SemaDeclCXX.cpp:16561
clang::Sema::CurInitSegLoc
SourceLocation CurInitSegLoc
Definition: Sema.h:902
clang::Sema::VAK_ValidInCXX11
@ VAK_ValidInCXX11
Definition: Sema.h:12040
clang::AutoTypeLoc
Definition: TypeLoc.h:2114
clang::Sema::ActOnPragmaVisibility
void ActOnPragmaVisibility(const IdentifierInfo *VisType, SourceLocation PragmaLoc)
ActOnPragmaVisibility - Called on well formed #pragma GCC visibility... .
Definition: SemaAttr.cpp:1120
clang::Sema::CheckDeprecatedSYCLAttributeSpelling
void CheckDeprecatedSYCLAttributeSpelling(const ParsedAttr &A, StringRef NewName="")
Diagnoses an attribute in the 'intelfpga' namespace and suggests using the attribute in the 'intel' n...
Definition: SemaDeclAttr.cpp:323
clang::Sema::NTCUC_CopyInit
@ NTCUC_CopyInit
Definition: Sema.h:3098
clang::format::hash_combine
static void hash_combine(std::size_t &seed, const T &v)
Definition: UnwrappedLineParser.cpp:740
clang::Sema::PragmaStack::Slot::PragmaPushLocation
SourceLocation PragmaPushLocation
Definition: Sema.h:772
clang::SYCLIntegrationHeader::kind_stream
@ kind_stream
Definition: Sema.h:321
clang::Sema::isSameOrCompatibleFunctionType
bool isSameOrCompatibleFunctionType(QualType Param, QualType Arg)
Compare types for equality with respect to possibly compatible function types (noreturn adjustment,...
Definition: SemaTemplateDeduction.cpp:1148
ExternalASTSource.h
clang::Sema::LangOpts
const LangOptions & LangOpts
Definition: Sema.h:585
clang::Sema::DiagnoseUnexpandedParameterPackInRequiresExpr
bool DiagnoseUnexpandedParameterPackInRequiresExpr(RequiresExpr *RE)
If the given requirees-expression contains an unexpanded reference to one of its own parameter packs,...
Definition: SemaTemplateVariadic.cpp:410
clang::Sema::TPC_VarTemplate
@ TPC_VarTemplate
Definition: Sema.h:7999
clang::Sema::LoadExternalWeakUndeclaredIdentifiers
void LoadExternalWeakUndeclaredIdentifiers()
Load weak undeclared identifiers from the external source.
Definition: Sema.cpp:953
clang::Sema::DefineImplicitMoveConstructor
void DefineImplicitMoveConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
DefineImplicitMoveConstructor - Checks for feasibility of defining this constructor as the move const...
Definition: SemaDeclCXX.cpp:15266
clang::Sema::ProcessingContextState
DelayedDiagnosticsState ProcessingContextState
Definition: Sema.h:1100
clang::Sema::diagnoseEquivalentInternalLinkageDeclarations
void diagnoseEquivalentInternalLinkageDeclarations(SourceLocation Loc, const NamedDecl *D, ArrayRef< const NamedDecl * > Equiv)
Definition: SemaOverload.cpp:10018
clang::Sema::LookupIvarInObjCMethod
DeclResult LookupIvarInObjCMethod(LookupResult &Lookup, Scope *S, IdentifierInfo *II)
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
Definition: SemaExpr.cpp:2833
clang::Sema::DefaultedFunctionKind::isSpecialMember
bool isSpecialMember() const
Definition: Sema.h:3463
clang::Sema::ActOnUninitializedDecl
void ActOnUninitializedDecl(Decl *dcl)
Definition: SemaDecl.cpp:12883
clang::Sema::ActOnInitializerError
void ActOnInitializerError(Decl *Dcl)
ActOnInitializerError - Given that there was an error parsing an initializer for the given declaratio...
Definition: SemaDecl.cpp:12841
clang::Sema::ArgumentPackSubstitutionRAII
friend class ArgumentPackSubstitutionRAII
Definition: Sema.h:9288
clang::Sema::ActOnSYCLUniqueStableNameExpr
ExprResult ActOnSYCLUniqueStableNameExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, ParsedType ParsedTy)
Definition: SemaExpr.cpp:3590
clang::Sema::ConvertDeclToDeclGroup
DeclGroupPtrTy ConvertDeclToDeclGroup(Decl *Ptr, Decl *OwnedType=nullptr)
Definition: SemaDecl.cpp:56
clang::Sema::RequireCompleteExprType
bool RequireCompleteExprType(Expr *E, CompleteTypeKind Kind, TypeDiagnoser &Diagnoser)
Ensure that the type of the given expression is complete.
Definition: SemaType.cpp:8571
clang::Sema::BuildObjCBridgedCast
ExprResult BuildObjCBridgedCast(SourceLocation LParenLoc, ObjCBridgeCastKind Kind, SourceLocation BridgeKeywordLoc, TypeSourceInfo *TSInfo, Expr *SubExpr)
Definition: SemaExprObjC.cpp:4640
clang::Sema::ACK_CompAssign
@ ACK_CompAssign
A compound assignment expression.
Definition: Sema.h:12094
clang::Sema::ActOnTypenameType
TypeResult ActOnTypenameType(Scope *S, SourceLocation TypenameLoc, const CXXScopeSpec &SS, const IdentifierInfo &II, SourceLocation IdLoc)
Called when the parser has parsed a C++ typename specifier, e.g., "typename T::type".
Definition: SemaTemplate.cpp:10378
clang::UsingDecl
Represents a C++ using-declaration.
Definition: DeclCXX.h:3399
clang::Sema::TDK_Incomplete
@ TDK_Incomplete
Template argument deduction did not deduce a value for every template parameter.
Definition: Sema.h:8817
clang::Sema::Global
@ Global
The global module fragment, between 'module;' and a module-declaration.
Definition: Sema.h:2114
clang::Sema::CheckTemplateArgumentList
bool CheckTemplateArgumentList(TemplateDecl *Template, SourceLocation TemplateLoc, TemplateArgumentListInfo &TemplateArgs, bool PartialTemplateArgs, SmallVectorImpl< TemplateArgument > &Converted, bool UpdateArgsWithConversions=true, bool *ConstraintsNotSatisfied=nullptr)
Check that the given template arguments can be be provided to the given template, converting the argu...
Definition: SemaTemplate.cpp:5654
clang::Sema::PerformImplicitConversion
ExprResult PerformImplicitConversion(Expr *From, QualType ToType, AssignmentAction Action, bool AllowExplicit=false)
PerformImplicitConversion - Perform an implicit conversion of the expression From to the type ToType.
Definition: SemaOverload.cpp:1495
clang::Sema::CheckUsingDeclRedeclaration
bool CheckUsingDeclRedeclaration(SourceLocation UsingLoc, bool HasTypenameKeyword, const CXXScopeSpec &SS, SourceLocation NameLoc, const LookupResult &Previous)
Checks that the given using declaration is not an invalid redeclaration.
Definition: SemaDeclCXX.cpp:12637
clang::Sema::CXXCheckConditionalOperands
QualType CXXCheckConditionalOperands(ExprResult &cond, ExprResult &lhs, ExprResult &rhs, ExprValueKind &VK, ExprObjectKind &OK, SourceLocation questionLoc)
Check the operands of ?: under C++ semantics.
Definition: SemaExprCXX.cpp:6217
clang::Sema::ImplicitExceptionSpecification::CalledStmt
void CalledStmt(Stmt *S)
Integrate an invoked statement into the collected data.
Definition: SemaDeclCXX.cpp:229
clang::ParsedTemplateArgument
Represents the parsed form of a C++ template argument.
Definition: ParsedTemplate.h:29
clang::Sema::ActOnOpenMPEndAssumesDirective
void ActOnOpenMPEndAssumesDirective()
Called on well-formed '#pragma omp end assumes'.
Definition: SemaOpenMP.cpp:3297
clang::Sema::PushLambdaScope
sema::LambdaScopeInfo * PushLambdaScope()
Definition: Sema.cpp:2194
clang::Sema::ParseObjCEncodeExpression
ExprResult ParseObjCEncodeExpression(SourceLocation AtLoc, SourceLocation EncodeLoc, SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc)
Definition: SemaExprObjC.cpp:1160
clang::Sema::OffsetOfComponent::IdentInfo
IdentifierInfo * IdentInfo
Definition: Sema.h:5924
clang::Sema::ActOnSourceLocExpr
ExprResult ActOnSourceLocExpr(SourceLocExpr::IdentKind Kind, SourceLocation BuiltinLoc, SourceLocation RPLoc)
Definition: SemaExpr.cpp:16400
clang::Sema::hasVisibleDefinition
bool hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested, bool OnlyNeedComplete=false)
Determine if D has a visible definition.
Definition: SemaType.cpp:8639
clang::Sema::IsInvalidUnlessNestedName
bool IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS, NestedNameSpecInfo &IdInfo, bool EnteringContext)
IsInvalidUnlessNestedName - This method is used for error recovery purposes to determine whether the ...
Definition: SemaCXXScopeSpec.cpp:897
clang::Sema::BuildMatrixType
QualType BuildMatrixType(QualType T, Expr *NumRows, Expr *NumColumns, SourceLocation AttrLoc)
Definition: SemaType.cpp:2716
clang::Sema::tryResolveExplicitSpecifier
bool tryResolveExplicitSpecifier(ExplicitSpecifier &ExplicitSpec)
tryResolveExplicitSpecifier - Attempt to resolve the explict specifier.
Definition: SemaDeclCXX.cpp:13256
clang::ObjCCategoryDecl
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2273
clang::Sema::AddModeAttr
void AddModeAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Name, bool InInstantiation=false)
AddModeAttr - Adds a mode attribute to a particular declaration.
clang::Sema::CorrectTypo
TypoCorrection CorrectTypo(const DeclarationNameInfo &Typo, Sema::LookupNameKind LookupKind, Scope *S, CXXScopeSpec *SS, CorrectionCandidateCallback &CCC, CorrectTypoKind Mode, DeclContext *MemberContext=nullptr, bool EnteringContext=false, const ObjCObjectPointerType *OPT=nullptr, bool RecordFailure=true)
Try to "correct" a typo in the source code by finding visible declarations whose names are similar to...
Definition: SemaLookup.cpp:5101
clang::Sema::NoteAllOverloadCandidates
void NoteAllOverloadCandidates(Expr *E, QualType DestType=QualType(), bool TakingAddress=false)
Definition: SemaOverload.cpp:10437
clang::Sema::ActOnOpenMPFlushDirective
StmtResult ActOnOpenMPFlushDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp flush'.
Definition: SemaOpenMP.cpp:10767
clang::Sema::getElaboratedType
QualType getElaboratedType(ElaboratedTypeKeyword Keyword, const CXXScopeSpec &SS, QualType T, TagDecl *OwnedTagDecl=nullptr)
Retrieve a version of the type 'T' that is elaborated by Keyword, qualified by the nested-name-specif...
Definition: SemaType.cpp:9059
clang::Sema::CodeSynthesisContext::ExplicitTemplateArgumentSubstitution
@ ExplicitTemplateArgumentSubstitution
We are substituting explicit template arguments provided for a function template.
Definition: Sema.h:9069
clang::Sema::ActOnCaseStmt
StmtResult ActOnCaseStmt(SourceLocation CaseLoc, ExprResult LHS, SourceLocation DotDotDotLoc, ExprResult RHS, SourceLocation ColonLoc)
Definition: SemaStmt.cpp:501
clang::Sema::SkipBodyInfo::CheckSameAsPrevious
bool CheckSameAsPrevious
Definition: Sema.h:2685
clang::Sema::NamedReturnInfo::Candidate
const VarDecl * Candidate
Definition: Sema.h:5152
clang::Sema::ActOnObjCBoolLiteral
ExprResult ActOnObjCBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind)
ActOnObjCBoolLiteral - Parse {__objc_yes,__objc_no} literals.
Definition: SemaExpr.cpp:20335
clang::Sema::SizelessTypeDiagnoser::diagnose
void diagnose(Sema &S, SourceLocation Loc, QualType T) override
Definition: Sema.h:2439
clang::Sema::PCC_Condition
@ PCC_Condition
Code completion occurs within the condition of an if, while, switch, or for statement.
Definition: Sema.h:12985
clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective
StmtResult ActOnOpenMPTargetTeamsDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute parallel for simd' after parsing of the as...
Definition: SemaOpenMP.cpp:13863
clang::Sema::UsualUnaryConversions
ExprResult UsualUnaryConversions(Expr *E)
UsualUnaryConversions - Performs various conversions that are common to most operators (C99 6....
Definition: SemaExpr.cpp:811
clang::Sema::CheckDeductionGuideDeclarator
void CheckDeductionGuideDeclarator(Declarator &D, QualType &R, StorageClass &SC)
Check the validity of a declarator that we parsed for a deduction-guide.
Definition: SemaDeclCXX.cpp:10970
clang::Sema::DiagnoseMultipleMethodInGlobalPool
void DiagnoseMultipleMethodInGlobalPool(SmallVectorImpl< ObjCMethodDecl * > &Methods, Selector Sel, SourceRange R, bool receiverIdOrClass)
Definition: SemaDeclObjC.cpp:3583
clang::Sema::hasVisibleMemberSpecialization
bool hasVisibleMemberSpecialization(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if there is a visible declaration of D that is a member specialization declaration (as oppo...
Definition: SemaLookup.cpp:1710
clang::LateParsedTemplate
Contains a late templated function.
Definition: Sema.h:13846
clang::ExternalSemaSource::ReadExtVectorDecls
virtual void ReadExtVectorDecls(SmallVectorImpl< TypedefNameDecl * > &Decls)
Read the set of ext_vector type declarations known to the external Sema source.
Definition: ExternalSemaSource.h:135
clang::SYCLIntegrationFooter
Definition: Sema.h:455
clang::Sema::CheckExplicitlyDefaultedFunction
void CheckExplicitlyDefaultedFunction(Scope *S, FunctionDecl *MD)
Definition: SemaDeclCXX.cpp:7404
clang::Sema::CheckAssignmentOperands
QualType CheckAssignmentOperands(Expr *LHSExpr, ExprResult &RHS, SourceLocation Loc, QualType CompoundType)
Definition: SemaExpr.cpp:13605
clang::Sema::CheckClassTemplate
DeclResult CheckClassTemplate(Scope *S, unsigned TagSpec, TagUseKind TUK, SourceLocation KWLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, TemplateParameterList *TemplateParams, AccessSpecifier AS, SourceLocation ModulePrivateLoc, SourceLocation FriendLoc, unsigned NumOuterTemplateParamLists, TemplateParameterList **OuterTemplateParamLists, SkipBodyInfo *SkipBody=nullptr)
Definition: SemaTemplate.cpp:1712
clang::Sema::ActOnOpenMPTargetTeamsDistributeParallelForDirective
StmtResult ActOnOpenMPTargetTeamsDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target teams distribute parallel for' after parsing of the associa...
Definition: SemaOpenMP.cpp:13808
clang::Sema::BuildObjCAtThrowStmt
StmtResult BuildObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw)
Definition: SemaStmt.cpp:4232
clang::Sema::HandleFunctionTypeMismatch
void HandleFunctionTypeMismatch(PartialDiagnostic &PDiag, QualType FromType, QualType ToType)
HandleFunctionTypeMismatch - Gives diagnostic information for differeing function types.
Definition: SemaOverload.cpp:2876
DiagnosticSema.h
clang::Sema::AddIntelFPGAForcePow2DepthAttr
void AddIntelFPGAForcePow2DepthAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::ActOnFinishKNRParamDeclarations
void ActOnFinishKNRParamDeclarations(Scope *S, Declarator &D, SourceLocation LocAfterDecls)
Definition: SemaDecl.cpp:14202
clang::Scope::incrementMSManglingNumber
void incrementMSManglingNumber()
Definition: Scope.h:314
clang::OpaquePtr
Wrapper for void* pointer.
Definition: Ownership.h:50
clang::Sema::NameClassification::getTemplateNameKind
TemplateNameKind getTemplateNameKind() const
Definition: Sema.h:2860
clang::FileNullability::PointerKind
uint8_t PointerKind
Which kind of pointer declarator we saw.
Definition: Sema.h:256
clang::Sema::UnusedPrivateFields
NamedDeclSetType UnusedPrivateFields
Set containing all declared private fields that are not used.
Definition: Sema.h:1004
clang::Sema::AssociatedNamespaceSet
llvm::SmallSetVector< DeclContext *, 16 > AssociatedNamespaceSet
Definition: Sema.h:3981
clang::Sema::InstantiateInClassInitializer
bool InstantiateInClassInitializer(SourceLocation PointOfInstantiation, FieldDecl *Instantiation, FieldDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiate the definition of a field from the given pattern.
Definition: SemaTemplateInstantiate.cpp:3033
clang::Sema::isFDReachableFromSyclDevice
bool isFDReachableFromSyclDevice(const FunctionDecl *Callee, const FunctionDecl *Caller)
Definition: Sema.h:1918
clang::Sema::GlobalMethodPool::insert
std::pair< iterator, bool > insert(std::pair< Selector, Lists > &&Val)
Definition: Sema.h:1641
clang::Sema::UnusedLocalTypedefNameCandidates
llvm::SmallSetVector< const TypedefNameDecl *, 4 > UnusedLocalTypedefNameCandidates
Set containing all typedefs that are likely unused.
Definition: Sema.h:1008
clang::FileNullabilityMap
A mapping from file IDs to a record of whether we've seen nullability information in that file.
Definition: Sema.h:264
clang::Sema::isCFError
bool isCFError(RecordDecl *D)
Definition: SemaType.cpp:4223
clang::Sema::ActOnCXXEnterDeclaratorScope
bool ActOnCXXEnterDeclaratorScope(Scope *S, CXXScopeSpec &SS)
ActOnCXXEnterDeclaratorScope - Called when a C++ scope specifier (global scope or nested-name-specifi...
Definition: SemaCXXScopeSpec.cpp:1088
clang::OverloadCandidateSet
OverloadCandidateSet - A set of overload candidates, used in C++ overload resolution (C++ 13....
Definition: Overload.h:935
clang::LangAS
LangAS
Defines the address space values used by the address space qualifier of QualType.
Definition: AddressSpaces.h:25
clang::Sema::NamedDeclSetType
llvm::SmallSetVector< NamedDecl *, 16 > NamedDeclSetType
Definition: Sema.h:1001
clang::Sema::StdCoroutineTraitsCache
ClassTemplateDecl * StdCoroutineTraitsCache
The C++ "std::coroutine_traits" template, which is defined in <coroutine_traits>
Definition: Sema.h:1312
clang::NSAPI::NumNSNumberLiteralMethods
static const unsigned NumNSNumberLiteralMethods
Definition: NSAPI.h:191
clang::Sema::PragmaStack::Slot::StackSlotLabel
llvm::StringRef StackSlotLabel
Definition: Sema.h:769
clang::Sema::containsUnexpandedParameterPacks
bool containsUnexpandedParameterPacks(Declarator &D)
Determine whether the given declarator contains any unexpanded parameter packs.
Definition: SemaTemplateVariadic.cpp:858
clang::Sema::AbstractReturnType
@ AbstractReturnType
Definition: Sema.h:7801
clang::Sema::isAcceptableTagRedeclaration
bool isAcceptableTagRedeclaration(const TagDecl *Previous, TagTypeKind NewTag, bool isDefinition, SourceLocation NewTagLoc, const IdentifierInfo *Name)
Determine whether a tag with a given kind is acceptable as a redeclaration of the given tag declarati...
Definition: SemaDecl.cpp:15643
clang::sema::FunctionScopeInfo
Retains information about a function, method, or block that is currently being parsed.
Definition: ScopeInfo.h:97
clang::Sema::SemaDiagnosticBuilder::K_Deferred
@ K_Deferred
Create a deferred diagnostic, which is emitted only if the function it's attached to is codegen'ed.
Definition: Sema.h:1954
clang::Sema::DiagnoseShadowingLambdaDecls
void DiagnoseShadowingLambdaDecls(const sema::LambdaScopeInfo *LSI)
Diagnose shadowing for variables shadowed in the lambda record LambdaRD when these variables are capt...
Definition: SemaDecl.cpp:7967
clang::Sema::ActOnOpenMPDeclareMapperDirective
DeclGroupPtrTy ActOnOpenMPDeclareMapperDirective(Scope *S, DeclContext *DC, DeclarationName Name, QualType MapperType, SourceLocation StartLoc, DeclarationName VN, AccessSpecifier AS, Expr *MapperVarRef, ArrayRef< OMPClause * > Clauses, Decl *PrevDeclInScope=nullptr)
Called on start of '#pragma omp declare mapper'.
Definition: SemaOpenMP.cpp:21460
clang::Sema::HandleField
FieldDecl * HandleField(Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS)
HandleField - Analyze a field of a C struct or a C++ data member.
Definition: SemaDecl.cpp:17044
clang::Sema::ActOnCapScopeReturnStmt
StmtResult ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, NamedReturnInfo &NRInfo, bool SupressSimplerImplicitMoves)
ActOnCapScopeReturnStmt - Utility routine to type-check return statements for capturing scopes.
Definition: SemaStmt.cpp:3554
clang::Sema::ActOnForEachDeclStmt
void ActOnForEachDeclStmt(DeclGroupPtrTy Decl)
Definition: SemaStmt.cpp:83
clang::Sema::CreateBuiltinMatrixSubscriptExpr
ExprResult CreateBuiltinMatrixSubscriptExpr(Expr *Base, Expr *RowIdx, Expr *ColumnIdx, SourceLocation RBLoc)
Definition: SemaExpr.cpp:5010
clang::Sema::ActOnObjCContainerStartDefinition
Decl * ActOnObjCContainerStartDefinition(Decl *IDecl)
Definition: SemaDecl.cpp:16793
clang::Sema::diagnoseTypo
void diagnoseTypo(const TypoCorrection &Correction, const PartialDiagnostic &TypoDiag, bool ErrorRecovery=true)
Definition: SemaLookup.cpp:5398
clang::Sema::PragmaStack::Act
void Act(SourceLocation PragmaLocation, PragmaMsStackAction Action, llvm::StringRef StackSlotLabel, ValueType Value)
Definition: Sema.h:780
clang::Sema::getCurGenericLambda
sema::LambdaScopeInfo * getCurGenericLambda()
Retrieve the current generic lambda info, if any.
Definition: Sema.cpp:2430
clang::Sema::tryConvertExprToType
ExprResult tryConvertExprToType(Expr *E, QualType Ty)
Try to convert an expression E to type Ty.
Definition: SemaExpr.cpp:5002
clang::Sema::PSK_Show
@ PSK_Show
Definition: Sema.h:659
clang::Sema::canDelayFunctionBody
bool canDelayFunctionBody(const Declarator &D)
Determine whether we can delay parsing the body of a function or function template until it is used,...
Definition: SemaDecl.cpp:14622
clang::Sema::FinalizeDeclaratorGroup
DeclGroupPtrTy FinalizeDeclaratorGroup(Scope *S, const DeclSpec &DS, ArrayRef< Decl * > Group)
Definition: SemaDecl.cpp:13765
clang::Sema::LookupBinOp
void LookupBinOp(Scope *S, SourceLocation OpLoc, BinaryOperatorKind Opc, UnresolvedSetImpl &Functions)
Definition: SemaExpr.cpp:15053
clang::Sema::CheckForwardProtocolDeclarationForCircularDependency
bool CheckForwardProtocolDeclarationForCircularDependency(IdentifierInfo *PName, SourceLocation &PLoc, SourceLocation PrevLoc, const ObjCList< ObjCProtocolDecl > &PList)
Definition: SemaDeclObjC.cpp:1184
clang::Sema::CCEK_TemplateArg
@ CCEK_TemplateArg
Value of a non-type template parameter.
Definition: Sema.h:3865
clang::Sema::DeleteExprLoc
std::pair< SourceLocation, bool > DeleteExprLoc
Delete-expressions to be analyzed at the end of translation unit.
Definition: Sema.h:1015
clang::LangOptions::FPModeKind
FPModeKind
Definition: LangOptions.h:218
clang::Sema::TemplateNameKindForDiagnostics
TemplateNameKindForDiagnostics
Describes the detailed kind of a template name. Used in diagnostics.
Definition: Sema.h:2923
clang::Sema::PerformObjectMemberConversion
ExprResult PerformObjectMemberConversion(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, NamedDecl *Member)
Cast a base object to a member's actual type.
Definition: SemaExpr.cpp:3008
clang::Sema::DefineImplicitMoveAssignment
void DefineImplicitMoveAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
Defines an implicitly-declared move assignment operator.
Definition: SemaDeclCXX.cpp:14823
clang::Sema::FunctionScopeRAII::~FunctionScopeRAII
~FunctionScopeRAII()
Definition: Sema.h:5033
clang::Sema::InstantiatingTemplate::InstantiatingTemplate
InstantiatingTemplate(Sema &SemaRef, SourceLocation PointOfInstantiation, Decl *Entity, SourceRange InstantiationRange=SourceRange())
Note that we are instantiating a class template, function template, variable template,...
Definition: SemaTemplateInstantiate.cpp:261
clang::ConstexprSpecKind
ConstexprSpecKind
Define the kind of constexpr specifier.
Definition: Specifiers.h:32
clang::Sema::RebuildTemplateParamsInCurrentInstantiation
bool RebuildTemplateParamsInCurrentInstantiation(TemplateParameterList *Params)
Rebuild the template parameters now that we know we're in a current instantiation.
Definition: SemaTemplate.cpp:10856
clang::Sema::addInitCapture
void addInitCapture(sema::LambdaScopeInfo *LSI, VarDecl *Var)
Add an init-capture to a lambda scope.
Definition: SemaLambda.cpp:884
clang::Sema::AddConversionCandidate
void AddConversionCandidate(CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit, bool AllowExplicit, bool AllowResultConversion=true)
AddConversionCandidate - Add a C++ conversion function as a candidate in the candidate set (C++ [over...
Definition: SemaOverload.cpp:7323
clang::Sema::ActOnOpenMPParallelSectionsDirective
StmtResult ActOnOpenMPParallelSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel sections' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10646
clang::Sema::CheckLoopHintExpr
bool CheckLoopHintExpr(Expr *E, SourceLocation Loc)
Definition: SemaExpr.cpp:3754
clang::Sema::NTK_NonClass
@ NTK_NonClass
Definition: Sema.h:3357
clang::Sema::DeleteLocs
llvm::SmallVector< DeleteExprLoc, 4 > DeleteLocs
Definition: Sema.h:1016
clang::Sema::ConvertIntegerToTypeWarnOnOverflow
void ConvertIntegerToTypeWarnOnOverflow(llvm::APSInt &OldVal, unsigned NewWidth, bool NewSign, SourceLocation Loc, unsigned DiagID)
ConvertIntegerToTypeWarnOnOverflow - Convert the specified APInt to have the specified width and sign...
clang::Sema::ActOnObjCAutoreleasePoolStmt
StmtResult ActOnObjCAutoreleasePoolStmt(SourceLocation AtLoc, Stmt *Body)
Definition: SemaStmt.cpp:4332
clang::Sema::CheckUnresolvedMemberAccess
AccessResult CheckUnresolvedMemberAccess(UnresolvedMemberExpr *E, DeclAccessPair FoundDecl)
Perform access-control checking on a previously-unresolved member access which has now been resolved ...
Definition: SemaAccess.cpp:1562
clang::Sema::PragmaClangSection
Definition: Sema.h:642
clang::AccessSpecifier
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Definition: Specifiers.h:108
clang::Sema::LocsWithCUDACallDiags
llvm::DenseSet< FunctionDeclAndLoc > LocsWithCUDACallDiags
FunctionDecls and SourceLocations for which CheckCUDACall has emitted a (maybe deferred) "bad call" d...
Definition: Sema.h:12717
clang::Sema::shouldLinkDependentDeclWithPrevious
bool shouldLinkDependentDeclWithPrevious(Decl *D, Decl *OldDecl)
Checks if the new declaration declared in dependent context must be put in the same redeclaration cha...
Definition: SemaDecl.cpp:10360
clang::Sema::PerformPendingInstantiations
void PerformPendingInstantiations(bool LocalOnly=false)
Performs template instantiation for all implicit template instantiations we have seen until this poin...
Definition: SemaTemplateInstantiateDecl.cpp:6698
clang::Sema::ArgumentDependentLookup
void ArgumentDependentLookup(DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, ADLResult &Functions)
Definition: SemaLookup.cpp:3631
clang::ObjCObjectPointerType
Represents a pointer to an Objective C object.
Definition: Type.h:6150
clang::Sema::CheckOverridingFunctionAttributes
bool CheckOverridingFunctionAttributes(const CXXMethodDecl *New, const CXXMethodDecl *Old)
Definition: SemaDeclCXX.cpp:17414
clang::Sema::ActOnPragmaFPExceptions
void ActOnPragmaFPExceptions(SourceLocation Loc, LangOptions::FPExceptionModeKind)
Called on well formed '#pragma clang fp' that has option 'exceptions'.
Definition: SemaAttr.cpp:1206
clang::Sema::FinalizeVarWithDestructor
void FinalizeVarWithDestructor(VarDecl *VD, const RecordType *DeclInitType)
FinalizeVarWithDestructor - Prepare for calling destructor on the constructed variable.
Definition: SemaDeclCXX.cpp:15613
clang::Sema::ExpressionEvaluationContextRecord::isDiscardedStatementContext
bool isDiscardedStatementContext() const
Definition: Sema.h:1518
clang::Sema::MaybeODRUseExprs
MaybeODRUseExprSet MaybeODRUseExprs
Definition: Sema.h:955
clang::SYCLIntegrationHeader::kind_sampler
@ kind_sampler
Definition: Sema.h:318
clang::Sema::KernelRTTI
@ KernelRTTI
Definition: Sema.h:13681
clang::Sema::BoundTypeDiagnoser::emit
void emit(const SemaDiagnosticBuilder &DB, std::index_sequence< Is... >) const
Definition: Sema.h:2399
clang::Sema::buildOverloadedCallSet
bool buildOverloadedCallSet(Scope *S, Expr *Fn, UnresolvedLookupExpr *ULE, MultiExprArg Args, SourceLocation RParenLoc, OverloadCandidateSet *CandidateSet, ExprResult *Result)
Constructs and populates an OverloadedCandidateSet from the given function.
Definition: SemaOverload.cpp:13058
clang::SYCLIntegrationHeader::addParamDesc
void addParamDesc(kernel_param_kind_t Kind, int Info, unsigned Offset)
Adds a kernel parameter descriptor to current kernel invocation descriptor.
Definition: SemaSYCL.cpp:4828
clang::Sema::CheckParamExceptionSpec
bool CheckParamExceptionSpec(const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const FunctionProtoType *Target, SourceLocation TargetLoc, const FunctionProtoType *Source, SourceLocation SourceLoc)
CheckParamExceptionSpec - Check if the parameter and return types of the two functions have equivalen...
Definition: SemaExceptionSpec.cpp:890
clang::Sema::IsQualificationConversion
bool IsQualificationConversion(QualType FromType, QualType ToType, bool CStyle, bool &ObjCLifetimeConversion)
IsQualificationConversion - Determines whether the conversion from an rvalue of type FromType to ToTy...
Definition: SemaOverload.cpp:3290
clang::Sema::DeviceKnownEmittedFns
llvm::DenseMap< CanonicalDeclPtr< FunctionDecl >, FunctionDeclAndLoc > DeviceKnownEmittedFns
An inverse call graph, mapping known-emitted functions to one of their known-emitted callers (plus th...
Definition: Sema.h:12726
clang::Sema::HideUsingShadowDecl
void HideUsingShadowDecl(Scope *S, UsingShadowDecl *Shadow)
Hides a using shadow declaration.
Definition: SemaDeclCXX.cpp:12135
clang::Sema::CVT_Both
@ CVT_Both
Emitted on host side only.
Definition: Sema.h:12820
clang::Sema::HandleDelayedAccessCheck
void HandleDelayedAccessCheck(sema::DelayedDiagnostic &DD, Decl *Ctx)
Definition: SemaAccess.cpp:1482
clang::Sema::LazilyCreateBuiltin
NamedDecl * LazilyCreateBuiltin(IdentifierInfo *II, unsigned ID, Scope *S, bool ForRedeclaration, SourceLocation Loc)
LazilyCreateBuiltin - The specified Builtin-ID was first used at file scope.
Definition: SemaDecl.cpp:2236
clang::Sema::MarkTypoCorrectedFunctionDefinition
void MarkTypoCorrectedFunctionDefinition(const NamedDecl *F)
Definition: SemaDecl.cpp:8522
clang::Sema::ActOnTemplateName
TemplateNameKind ActOnTemplateName(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool AllowInjectedClassName=false)
Form a template name from a name that is syntactically required to name a template,...
Definition: SemaTemplate.cpp:4827
clang::CallExpr::ADLCallKind
ADLCallKind
Definition: Expr.h:2909
clang::Sema::PragmaClangBSSSection
PragmaClangSection PragmaClangBSSSection
Definition: Sema.h:648
clang::Sema::SynthesizedFunctionScope::SynthesizedFunctionScope
SynthesizedFunctionScope(Sema &S, DeclContext *DC)
Definition: Sema.h:1219
clang::Sema::VerifyICEDiagnoser::~VerifyICEDiagnoser
virtual ~VerifyICEDiagnoser()
Definition: Sema.h:12639
clang::Sema::BuildImplicitMemberExpr
ExprResult BuildImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, bool IsDefiniteInstance, const Scope *S)
Builds an implicit member access expression.
Definition: SemaExprMember.cpp:1868
clang::Sema::BuildArrayTypeTrait
ExprResult BuildArrayTypeTrait(ArrayTypeTrait ATT, SourceLocation KWLoc, TypeSourceInfo *TSInfo, Expr *DimExpr, SourceLocation RParen)
Definition: SemaExprCXX.cpp:5708
clang::Sema::addAMDGPUWavesPerEUAttr
void addAMDGPUWavesPerEUAttr(Decl *D, const AttributeCommonInfo &CI, Expr *Min, Expr *Max)
addAMDGPUWavePersEUAttr - Adds an amdgpu_waves_per_eu attribute to a particular declaration.
clang::Sema::FunctionScopesStart
unsigned FunctionScopesStart
The index of the first FunctionScope that corresponds to the current context.
Definition: Sema.h:965
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:254
clang::Sema::ContextualImplicitConverter::diagnoseNoMatch
virtual SemaDiagnosticBuilder diagnoseNoMatch(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic complaining that the expression does not have integral or enumeration type.
clang::Sema::ReuseLambdaContextDecl_t
ReuseLambdaContextDecl_t
Definition: Sema.h:5356
clang::Sema::VAK_Invalid
@ VAK_Invalid
Definition: Sema.h:12043
clang::Sema::MarkVTableUsed
void MarkVTableUsed(SourceLocation Loc, CXXRecordDecl *Class, bool DefinitionRequired=false)
Note that the vtable for the given class was used at the given location.
Definition: SemaDeclCXX.cpp:17695
clang::Sema::checkSpecializationVisibility
void checkSpecializationVisibility(SourceLocation Loc, NamedDecl *Spec)
We've found a use of a templated declaration that would trigger an implicit instantiation.
Definition: SemaTemplate.cpp:11111
clang::Sema::ExpressionEvaluationContext
ExpressionEvaluationContext
Describes how the expressions currently being parsed are evaluated at run-time, if at all.
Definition: Sema.h:1378
clang::Sema::CodeSynthesisContext::Memoization
@ Memoization
Added for Template instantiation observation.
Definition: Sema.h:9142
clang::Sema::IER_Dependent
@ IER_Dependent
The name is a dependent name, so the results will differ from one instantiation to the next.
Definition: Sema.h:5978
clang::DeclaratorChunk::ParamInfo
ParamInfo - An array of paraminfo objects is allocated whenever a function declarator is parsed.
Definition: DeclSpec.h:1251
clang::Sema::OriginalCallArg::ArgIdx
unsigned ArgIdx
Definition: Sema.h:8890
clang::Sema::FindProtocolDeclaration
void FindProtocolDeclaration(bool WarnOnDeclarations, bool ForObjCContainer, ArrayRef< IdentifierLocPair > ProtocolId, SmallVectorImpl< Decl * > &Protocols)
FindProtocolDeclaration - This routine looks up protocols and issues an error if they are not declare...
Definition: SemaDeclObjC.cpp:1298
clang::Sema::ActOnStmtExprResult
ExprResult ActOnStmtExprResult(ExprResult E)
Definition: SemaExpr.cpp:15627
clang::Sema::IncompatibleObjCWeakRef
@ IncompatibleObjCWeakRef
IncompatibleObjCWeakRef - Assigning a weak-unavailable object to an object with __weak qualifier.
Definition: Sema.h:12181
clang::Sema::PopForceCUDAHostDevice
bool PopForceCUDAHostDevice()
Decrements our count of the number of times we've seen a pragma forcing functions to be host device.
Definition: SemaCUDA.cpp:42
clang::Sema::getLookupModules
llvm::DenseSet< Module * > & getLookupModules()
Get the set of additional modules that should be checked during name lookup.
Definition: SemaLookup.cpp:1596
clang::Sema::EnsureTemplateArgumentListConstraints
bool EnsureTemplateArgumentListConstraints(TemplateDecl *Template, ArrayRef< TemplateArgument > TemplateArgs, SourceRange TemplateIDRange)
Ensure that the given template arguments satisfy the constraints associated with the given template,...
Definition: SemaConcept.cpp:386
clang::Sema::FPFeaturesStateRAII::FPFeaturesStateRAII
FPFeaturesStateRAII(Sema &S)
Definition: Sema.cpp:2753
clang::Sema::OMPIteratorData::DeclIdentLoc
SourceLocation DeclIdentLoc
Definition: Sema.h:5720
clang::Sema::TDK_InstantiationDepth
@ TDK_InstantiationDepth
Template argument deduction exceeded the maximum template instantiation depth (which has already been...
Definition: Sema.h:8814
clang::Sema::CheckObjCMethodDirectOverrides
void CheckObjCMethodDirectOverrides(ObjCMethodDecl *method, ObjCMethodDecl *overridden)
Definition: SemaDeclObjC.cpp:4411
clang::Sema::DeviceDiagnosticReason::All
@ All
A flag representing 'all'.
clang::Sema::BSSSegStack
PragmaStack< StringLiteral * > BSSSegStack
Definition: Sema.h:868
clang::Sema::CodeSynthesisContext::DefaultFunctionArgumentInstantiation
@ DefaultFunctionArgumentInstantiation
We are instantiating a default argument for a function.
Definition: Sema.h:9065
clang::Sema::BuildMemInitializer
MemInitResult BuildMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, Expr *Init, SourceLocation EllipsisLoc)
Handle a C++ member initializer.
Definition: SemaDeclCXX.cpp:4225
clang::Sema::LookupInlineAsmIdentifier
ExprResult LookupInlineAsmIdentifier(CXXScopeSpec &SS, SourceLocation TemplateKWLoc, UnqualifiedId &Id, bool IsUnevaluatedContext)
Definition: SemaStmtAsm.cpp:768
clang::Sema::ActOnOpenMPInReductionClause
OMPClause * ActOnOpenMPInReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=llvm::None)
Called on well-formed 'in_reduction' clause.
Definition: SemaOpenMP.cpp:18982
clang::sema::AnalysisBasedWarnings::Policy
Definition: AnalysisBasedWarnings.h:33
clang::Sema::DiagnoseUnguardedAvailabilityViolations
void DiagnoseUnguardedAvailabilityViolations(Decl *FD)
Issue any -Wunguarded-availability warnings in FD.
Definition: SemaAvailability.cpp:888
clang::Sema::LateParsedTemplateMap
LateParsedTemplateMapT LateParsedTemplateMap
Definition: Sema.h:1076
IVDepExprResult::Invalid
@ Invalid
clang::Sema::SetParamDefaultArgument
void SetParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
Definition: SemaDeclCXX.cpp:286
clang::Sema::getExternalSource
ExternalSemaSource * getExternalSource() const
Definition: Sema.h:1784
clang::Sema::ActOnSEHLeaveStmt
StmtResult ActOnSEHLeaveStmt(SourceLocation Loc, Scope *CurScope)
Definition: SemaStmt.cpp:4612
clang::Sema::getNonTagTypeDeclKind
NonTagKind getNonTagTypeDeclKind(const Decl *D, TagTypeKind TTK)
Given a non-tag type declaration, returns an enum useful for indicating what kind of non-tag type thi...
Definition: SemaDecl.cpp:15614
clang::Sema::NameClassification::NameClassification
NameClassification(ParsedType Type)
Definition: Sema.h:2774
clang::Sema::StdAlignValT
LazyDeclPtr StdAlignValT
The C++ "std::align_val_t" enum class, which is defined by the C++ standard library.
Definition: Sema.h:1300
clang::tok::TokenKind
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
Definition: TokenKinds.h:25
clang::Sema::ActOnUndeclaredTypeTemplateName
void ActOnUndeclaredTypeTemplateName(Scope *S, TemplateTy &Name, TemplateNameKind &TNK, SourceLocation NameLoc, IdentifierInfo *&II)
Try to resolve an undeclared template name as a type template.
Definition: SemaTemplate.cpp:3852
clang::Sema::CheckCXXDefaultArguments
void CheckCXXDefaultArguments(FunctionDecl *FD)
CheckCXXDefaultArguments - Verify that the default arguments for a function declaration are well-form...
Definition: SemaDeclCXX.cpp:1584
clang::Sema::FPFeaturesStateRAII::~FPFeaturesStateRAII
~FPFeaturesStateRAII()
Definition: Sema.cpp:2759
clang::Sema::InventAbbreviatedTemplateParameterTypeName
IdentifierInfo * InventAbbreviatedTemplateParameterTypeName(IdentifierInfo *ParamName, unsigned Index)
Invent a new identifier for parameters of abbreviated templates.
Definition: Sema.cpp:89
clang::Sema::computeDeclContext
DeclContext * computeDeclContext(QualType T)
Compute the DeclContext that is associated with the given type.
Definition: SemaCXXScopeSpec.cpp:53
clang::Sema::DefaultedComparisonKind
DefaultedComparisonKind
Kinds of defaulted comparison operator functions.
Definition: Sema.h:1688
clang::Sema::ActOnReenterTemplateScope
unsigned ActOnReenterTemplateScope(Decl *Template, llvm::function_ref< Scope *()> EnterScope)
Definition: SemaDeclCXX.cpp:10283
clang::Sema::CheckImplicitSpecialMemberDeclaration
void CheckImplicitSpecialMemberDeclaration(Scope *S, FunctionDecl *FD)
Check a completed declaration of an implicit special member.
Definition: SemaDeclCXX.cpp:13368
clang::Sema::ActOnRequiresClause
ExprResult ActOnRequiresClause(ExprResult ConstraintExpr)
Definition: SemaDeclCXX.cpp:4032
clang::Sema::SemaBuiltinShuffleVector
ExprResult SemaBuiltinShuffleVector(CallExpr *TheCall)
SemaBuiltinShuffleVector - Handle __builtin_shufflevector.
Definition: SemaChecking.cpp:7194
clang::Sema::CUDAFunctionPreference
CUDAFunctionPreference
Definition: Sema.h:12835
clang::Sema::DeclGroupPtrTy
OpaquePtr< DeclGroupRef > DeclGroupPtrTy
Definition: Sema.h:578
clang::ast_matchers::decl
const internal::VariadicAllOfMatcher< Decl > decl
Matches declarations.
Definition: ASTMatchersInternal.cpp:734
clang::Sema::CheckUnaryExprOrTypeTraitOperand
bool CheckUnaryExprOrTypeTraitOperand(Expr *E, UnaryExprOrTypeTrait ExprKind)
Check the constraints on expression operands to unary type expression and type traits.
Definition: SemaExpr.cpp:4296
P
StringRef P
Definition: ASTMatchersInternal.cpp:563
clang::Sema::UnusedFileScopedDecls
UnusedFileScopedDeclsType UnusedFileScopedDecls
The set of file scoped decls seen so far that have not been used and must warn if not used.
Definition: Sema.h:1049
clang::Sema::OCK_Interface
@ OCK_Interface
Definition: Sema.h:9944
clang::Sema::CTK_ErrorRecovery
@ CTK_ErrorRecovery
Definition: Sema.h:4544
clang::Sema::BuildForRangeBeginEndCall
ForRangeStatus BuildForRangeBeginEndCall(SourceLocation Loc, SourceLocation RangeLoc, const DeclarationNameInfo &NameInfo, LookupResult &MemberLookup, OverloadCandidateSet *CandidateSet, Expr *Range, ExprResult *CallExpr)
Build a call to 'begin' or 'end' for a C++11 for-range statement.
Definition: SemaOverload.cpp:15058
clang::Sema::CodeCompleteObjCInstanceMessage
void CodeCompleteObjCInstanceMessage(Scope *S, Expr *Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, ObjCInterfaceDecl *Super=nullptr)
Definition: SemaCodeComplete.cpp:8033
clang::Sema::TemplateDeductionResult
TemplateDeductionResult
Describes the result of template argument deduction.
Definition: Sema.h:8807
AccessResult
AccessResult
A copy of Sema's enum without AR_delayed.
Definition: SemaAccess.cpp:30
clang::Sema::CheckIfOverriddenFunctionIsMarkedFinal
bool CheckIfOverriddenFunctionIsMarkedFinal(const CXXMethodDecl *New, const CXXMethodDecl *Old)
CheckForFunctionMarkedFinal - Checks whether a virtual member function overrides a virtual member fun...
Definition: SemaDeclCXX.cpp:3183
clang::Sema::LookupModulesCache
llvm::DenseSet< Module * > LookupModulesCache
Cache of additional modules that should be used for name lookup within the current template instantia...
Definition: Sema.h:9218
clang::Sema::ModuleImportState
ModuleImportState
An enumeration to represent the transition of states in parsing module fragments and imports.
Definition: Sema.h:3227
clang::VK_PRValue
@ VK_PRValue
A pr-value expression (in the C++11 taxonomy) produces a temporary value.
Definition: Specifiers.h:120
clang::Sema::AddFactoryMethodToGlobalPool
void AddFactoryMethodToGlobalPool(ObjCMethodDecl *Method, bool impl=false)
AddFactoryMethodToGlobalPool - Same as above, but for factory methods.
Definition: Sema.h:4924
clang::Sema::DiagnoseAssignmentEnum
void DiagnoseAssignmentEnum(QualType DstType, QualType SrcType, Expr *SrcExpr)
DiagnoseAssignmentEnum - Warn if assignment to enum is a constant integer not in the range of enum va...
Definition: SemaStmt.cpp:1620
clang::TemplateSpecializationKind
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
Definition: Specifiers.h:173
clang::Sema::ActOnDependentIdExpression
ExprResult ActOnDependentIdExpression(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, bool isAddressOfOperand, const TemplateArgumentListInfo *TemplateArgs)
ActOnDependentIdExpression - Handle a dependent id-expression that was just parsed.
Definition: SemaTemplate.cpp:722
clang::Sema::isOpenMPDeclareMapperVarDeclAllowed
bool isOpenMPDeclareMapperVarDeclAllowed(const VarDecl *VD) const
Definition: SemaOpenMP.cpp:21564
clang::Sema::ActOnVariableDeclarator
NamedDecl * ActOnVariableDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope, ArrayRef< BindingDecl * > Bindings=None)
Definition: SemaDecl.cpp:7081
clang::Sema::DefineImplicitDefaultConstructor
void DefineImplicitDefaultConstructor(SourceLocation CurrentLocation, CXXConstructorDecl *Constructor)
DefineImplicitDefaultConstructor - Checks for feasibility of defining this constructor as the default...
Definition: SemaDeclCXX.cpp:13473
clang::Sema::DefaultedFunctionKind
For a defaulted function, the kind of defaulted function that it is.
Definition: Sema.h:3450
clang::Sema::POAK_Reset
@ POAK_Reset
Definition: Sema.h:10357
clang::Sema::Compatible
@ Compatible
Compatible - the types are compatible according to the standard.
Definition: Sema.h:12112
clang::Sema::DeclareGlobalAllocationFunction
void DeclareGlobalAllocationFunction(DeclarationName Name, QualType Return, ArrayRef< QualType > Params)
DeclareGlobalAllocationFunction - Declares a single implicit global allocation function if it doesn't...
Definition: SemaExprCXX.cpp:3052
clang::Sema::makeModuleVisible
void makeModuleVisible(Module *Mod, SourceLocation ImportLoc)
Definition: Sema.h:2530
clang::Sema::addSyclOpenCLKernel
void addSyclOpenCLKernel(const FunctionDecl *SyclKernel, FunctionDecl *OpenCLKernel)
Definition: Sema.h:13653
clang::Sema::PragmaAttributeEntry::Loc
SourceLocation Loc
Definition: Sema.h:909
clang::Sema::CheckNonTypeTemplateParameterType
QualType CheckNonTypeTemplateParameterType(TypeSourceInfo *&TSI, SourceLocation Loc)
Check that the type of a non-type template parameter is well-formed.
Definition: SemaTemplate.cpp:1284
clang::Sema::QIDNSCopying
QualType QIDNSCopying
id<NSCopying> type.
Definition: Sema.h:1367
clang::Sema::getCurrentInstantiationOf
CXXRecordDecl * getCurrentInstantiationOf(NestedNameSpecifier *NNS)
If the given nested name specifier refers to the current instantiation, return the declaration that c...
Definition: SemaCXXScopeSpec.cpp:179
clang::Sema::IntToBlockPointer
@ IntToBlockPointer
IntToBlockPointer - The assignment converts an int to a block pointer.
Definition: Sema.h:12168
clang::Sema::DefineImplicitCopyAssignment
void DefineImplicitCopyAssignment(SourceLocation CurrentLocation, CXXMethodDecl *MethodDecl)
Defines an implicitly-declared copy assignment operator.
Definition: SemaDeclCXX.cpp:14459
clang::Sema::getCurBlock
sema::BlockScopeInfo * getCurBlock()
Retrieve the current block, if any.
Definition: Sema.cpp:2362
clang::Sema::ActOnOpenMPSectionDirective
StmtResult ActOnOpenMPSectionDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp section' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10097
clang::Sema::ActOnOpenMPUsesAllocatorClause
OMPClause * ActOnOpenMPUsesAllocatorClause(SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< UsesAllocatorsData > Data)
Called on well-formed 'uses_allocators' clause.
Definition: SemaOpenMP.cpp:22631
clang::Sema::ObjCArgInfo::NameLoc
SourceLocation NameLoc
Definition: Sema.h:10165
clang::Sema::checkPseudoObjectRValue
ExprResult checkPseudoObjectRValue(Expr *E)
Definition: SemaPseudoObject.cpp:1527
clang::Sema::IsDerivedFrom
bool IsDerivedFrom(SourceLocation Loc, QualType Derived, QualType Base)
Determine whether the type Derived is a C++ class that is derived from the type Base.
Definition: SemaDeclCXX.cpp:2835
clang::Sema::TDK_DeducedMismatch
@ TDK_DeducedMismatch
After substituting deduced template arguments, a dependent parameter type did not match the correspon...
Definition: Sema.h:8834
clang::Sema::TypoCorrectionFailures
IdentifierSourceLocations TypoCorrectionFailures
A cache containing identifiers for which typo correction failed and their locations,...
Definition: Sema.h:9596
clang::Sema::TemplateNameKindForDiagnostics::DependentTemplate
@ DependentTemplate
clang::Sema::PerformObjectArgumentInitialization
ExprResult PerformObjectArgumentInitialization(Expr *From, NestedNameSpecifier *Qualifier, NamedDecl *FoundDecl, CXXMethodDecl *Method)
PerformObjectArgumentInitialization - Perform initialization of the implicit object parameter for the...
Definition: SemaOverload.cpp:5486
clang::Sema::BuildBlockPointerType
QualType BuildBlockPointerType(QualType T, SourceLocation Loc, DeclarationName Entity)
Build a block pointer type.
Definition: SemaType.cpp:3003
clang::Sema::CodeCompleteAfterFunctionEquals
void CodeCompleteAfterFunctionEquals(Declarator &D)
Definition: SemaCodeComplete.cpp:6896
clang::Sema::getTemplateArgumentPackExpansionPattern
TemplateArgumentLoc getTemplateArgumentPackExpansionPattern(TemplateArgumentLoc OrigLoc, SourceLocation &Ellipsis, Optional< unsigned > &NumExpansions) const
Returns the pattern of the pack expansion for a template argument.
Definition: SemaTemplateVariadic.cpp:1055
clang::Sema::getFloat128Identifier
IdentifierInfo * getFloat128Identifier() const
Definition: Sema.cpp:2724
clang::Sema::ImpCastExprToType
ExprResult ImpCastExprToType(Expr *E, QualType Type, CastKind CK, ExprValueKind VK=VK_PRValue, const CXXCastPath *BasePath=nullptr, CheckedConversionKind CCK=CCK_ImplicitConversion)
ImpCastExprToType - If Expr is not of type 'Type', insert an implicit cast.
Definition: Sema.cpp:659
clang::Sema::SubstDecl
Decl * SubstDecl(Decl *D, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiateDecl.cpp:4303
clang::Sema::CreateBuiltinUnaryOp
ExprResult CreateBuiltinUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *InputExpr)
Definition: SemaExpr.cpp:15251
clang::Sema::FullExprArg::get
Expr * get() const
Definition: Sema.h:4971
clang::Sema::PushExpressionEvaluationContext
void PushExpressionEvaluationContext(ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, ExpressionEvaluationContextRecord::ExpressionKind Type=ExpressionEvaluationContextRecord::EK_Other)
Definition: SemaExpr.cpp:17023
clang::Sema::KernelAllocateStorage
@ KernelAllocateStorage
Definition: Sema.h:13687
clang::Sema::ActOnFriendTypeDecl
Decl * ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS, MultiTemplateParamsArg TemplateParams)
Handle a friend type declaration.
Definition: SemaDeclCXX.cpp:16847
clang::Sema::mergeErrorAttr
ErrorAttr * mergeErrorAttr(Decl *D, const AttributeCommonInfo &CI, StringRef NewUserDiagnostic)
clang::Sema::ExpressionEvaluationContextRecord::isImmediateFunctionContext
bool isImmediateFunctionContext() const
Definition: Sema.h:1512
clang::Sema::CheckQualifiedMemberReference
bool CheckQualifiedMemberReference(Expr *BaseExpr, QualType BaseType, const CXXScopeSpec &SS, const LookupResult &R)
Definition: SemaExprMember.cpp:552
clang::Sema::BuildReturnStmt
StmtResult BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, bool AllowRecovery=false)
Definition: SemaStmt.cpp:3919
clang::Sema::SuppressedDiagnosticsMap
llvm::DenseMap< Decl *, SmallVector< PartialDiagnosticAt, 1 > > SuppressedDiagnosticsMap
For each declaration that involved template argument deduction, the set of diagnostics that were supp...
Definition: Sema.h:9296
clang::Sema::ActOnOpenMPInclusiveClause
OMPClause * ActOnOpenMPInclusiveClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'inclusive' clause.
Definition: SemaOpenMP.cpp:22533
clang::Sema::UsesAllocatorsData::AllocatorTraits
Expr * AllocatorTraits
Allocator traits.
Definition: Sema.h:11931
clang::Sema::diagIfOpenMPDeviceCode
SemaDiagnosticBuilder diagIfOpenMPDeviceCode(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD)
Creates a SemaDiagnosticBuilder that emits the diagnostic if the current context is "used as device c...
Definition: SemaOpenMP.cpp:1913
clang::Sema::RequiredTemplateKind::isRequired
bool isRequired() const
Definition: Sema.h:7865
clang::Sema::AccessResult
AccessResult
Definition: Sema.h:7714
clang::Sema::getScopeForDeclContext
static Scope * getScopeForDeclContext(Scope *S, DeclContext *DC)
Finds the scope corresponding to the given decl context, if it happens to be an enclosing scope.
Definition: SemaDecl.cpp:1561
clang::Sema::AttributeCompletion::Attribute
@ Attribute
clang::Sema::SkipBodyInfo::SkipBodyInfo
SkipBodyInfo()
Definition: Sema.h:2681
clang::Sema::AlignPackIncludeState::CurrentPragmaLocation
SourceLocation CurrentPragmaLocation
Definition: Sema.h:862
clang::OMPIteratorExpr::IteratorRange
Iterator range representation begin:end[:step].
Definition: ExprOpenMP.h:278
clang::Sema::PrintPragmaAttributeInstantiationPoint
void PrintPragmaAttributeInstantiationPoint()
Definition: SemaAttr.cpp:1043
Cache
TypePropertyCache< Private > Cache
Definition: Type.cpp:3863
clang::PredefinedExpr::IdentKind
IdentKind
Definition: Expr.h:1970
clang::Sema::ActOnStartTrailingRequiresClause
void ActOnStartTrailingRequiresClause(Scope *S, Declarator &D)
Definition: SemaDeclCXX.cpp:4014
clang::Sema::DeclareImplicitDestructor
CXXDestructorDecl * DeclareImplicitDestructor(CXXRecordDecl *ClassDecl)
Declare the implicit destructor for the given class.
Definition: SemaDeclCXX.cpp:13693
clang::Sema::DiagnoseReturnInConstructorExceptionHandler
void DiagnoseReturnInConstructorExceptionHandler(CXXTryStmt *TryBlock)
Definition: SemaDeclCXX.cpp:17407
clang::Sema::ActOnFinishFullExpr
ExprResult ActOnFinishFullExpr(Expr *Expr, bool DiscardedValue)
Definition: Sema.h:6830
clang::Sema::BuildObjCTypeParamType
QualType BuildObjCTypeParamType(const ObjCTypeParamDecl *Decl, SourceLocation ProtocolLAngleLoc, ArrayRef< ObjCProtocolDecl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc, bool FailOnError=false)
Build an Objective-C type parameter type.
Definition: SemaType.cpp:1057
PragmaKinds.h
clang::Sema::AddSYCLDeviceHasAttr
void AddSYCLDeviceHasAttr(Decl *D, const AttributeCommonInfo &CI, Expr **Exprs, unsigned Size)
clang::Sema::ConditionResult::getKnownValue
llvm::Optional< bool > getKnownValue() const
Definition: Sema.h:12553
clang::Sema::ActOnPragmaMSVtorDisp
void ActOnPragmaMSVtorDisp(PragmaMsStackAction Action, SourceLocation PragmaLoc, MSVtorDispMode Value)
Called on well formed #pragma vtordisp().
Definition: SemaAttr.cpp:572
clang::Sema::CheckOverrideControl
void CheckOverrideControl(NamedDecl *D)
CheckOverrideControl - Check C++11 override control semantics.
Definition: SemaDeclCXX.cpp:3059
clang::Sema::ImplicitExceptionSpecification::CalledDecl
void CalledDecl(SourceLocation CallLoc, const CXXMethodDecl *Method)
Integrate another called method into the collected data.
Definition: SemaDeclCXX.cpp:161
clang::Sema::CodeSynthesisContext::template_arguments
ArrayRef< TemplateArgument > template_arguments() const
Definition: Sema.h:9173
clang::Sema::DisableTypoCorrection
bool DisableTypoCorrection
Tracks whether we are in a context where typo correction is disabled.
Definition: Sema.h:9585
false
#define false
Definition: stdbool.h:22
clang::Sema::TDK_ConstraintsNotSatisfied
@ TDK_ConstraintsNotSatisfied
The deduced arguments did not satisfy the constraints associated with the template.
Definition: Sema.h:8855
clang::Sema::IfExistsResult
IfExistsResult
Describes the result of an "if-exists" condition check.
Definition: Sema.h:5969
clang::Sema::getTypoExprState
const TypoExprState & getTypoExprState(TypoExpr *TE) const
Definition: SemaLookup.cpp:5589
clang::StandardConversionSequence
StandardConversionSequence - represents a standard conversion sequence (C++ 13.3.3....
Definition: Overload.h:259
clang::Sema::createImplicitModuleImportForErrorRecovery
void createImplicitModuleImportForErrorRecovery(SourceLocation Loc, Module *Mod)
Create an implicit import of the given module at the given source location, for error recovery,...
Definition: SemaModule.cpp:658
clang::Sema::MarkBaseAndMemberDestructorsReferenced
void MarkBaseAndMemberDestructorsReferenced(SourceLocation Loc, CXXRecordDecl *Record)
MarkBaseAndMemberDestructorsReferenced - Given a record decl, mark all the non-trivial destructors of...
Definition: SemaDeclCXX.cpp:5623
clang::Sema::getStdBadAlloc
CXXRecordDecl * getStdBadAlloc() const
Definition: SemaDeclCXX.cpp:11278
clang::Sema::CheckObjCARCUnavailableWeakConversion
bool CheckObjCARCUnavailableWeakConversion(QualType castType, QualType ExprType)
Definition: SemaExprObjC.cpp:4586
clang::Sema::ActOnPragmaMSStruct
void ActOnPragmaMSStruct(PragmaMSStructKind Kind)
ActOnPragmaMSStruct - Called on well formed #pragma ms_struct [on|off].
Definition: SemaAttr.cpp:453
ExternalSemaSource.h
clang::Sema::actOnObjCTypeArgsAndProtocolQualifiers
TypeResult actOnObjCTypeArgsAndProtocolQualifiers(Scope *S, SourceLocation Loc, ParsedType BaseType, SourceLocation TypeArgsLAngleLoc, ArrayRef< ParsedType > TypeArgs, SourceLocation TypeArgsRAngleLoc, SourceLocation ProtocolLAngleLoc, ArrayRef< Decl * > Protocols, ArrayRef< SourceLocation > ProtocolLocs, SourceLocation ProtocolRAngleLoc)
Build a specialized and/or protocol-qualified Objective-C type.
Definition: SemaType.cpp:1155
clang::Sema::ActOnCoawaitExpr
ExprResult ActOnCoawaitExpr(Scope *S, SourceLocation KwLoc, Expr *E)
Definition: SemaCoroutine.cpp:805
clang::Sema::PragmaAttributeEntry
This an attribute introduced by #pragma clang attribute.
Definition: Sema.h:908
clang::Sema::CUDASetLambdaAttrs
void CUDASetLambdaAttrs(CXXMethodDecl *Method)
Set device or host device attributes on the given lambda operator() method.
Definition: SemaCUDA.cpp:898
clang::Sema::ActOnExprStmtError
StmtResult ActOnExprStmtError()
Definition: SemaStmt.cpp:63
clang::Sema::SubstStmt
StmtResult SubstStmt(Stmt *S, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:3547
clang::Sema::BuildDelegatingInitializer
MemInitResult BuildDelegatingInitializer(TypeSourceInfo *TInfo, Expr *Init, CXXRecordDecl *ClassDecl)
Definition: SemaDeclCXX.cpp:4481
clang::Sema::UnparsedDefaultArgInstantiationsMap
llvm::DenseMap< ParmVarDecl *, llvm::TinyPtrVector< ParmVarDecl * > > UnparsedDefaultArgInstantiationsMap
Definition: Sema.h:1601
clang::DeclResult
ActionResult< Decl * > DeclResult
Definition: Ownership.h:268
clang::Sema::ActOnFinishCXXMemberDecls
void ActOnFinishCXXMemberDecls()
Perform any semantic analysis which needs to be delayed until all pending class member declarations h...
Definition: SemaDeclCXX.cpp:13824
clang::PartialDiagnostic::Emit
void Emit(const DiagnosticBuilder &DB) const
Definition: PartialDiagnostic.h:144
clang::concepts::TypeRequirement
A requires-expression requirement which queries the existence of a type name or type template special...
Definition: ExprConcepts.h:203
clang::FileNullability
Describes whether we've seen any nullability information for the given file.
Definition: Sema.h:246
clang::Sema::FST_Printf
@ FST_Printf
Definition: Sema.h:13323
clang::Sema::ExtParameterInfoBuilder
A helper class for building up ExtParameterInfos.
Definition: Sema.h:9698
clang::Sema::PerformCopyInitialization
ExprResult PerformCopyInitialization(const InitializedEntity &Entity, SourceLocation EqualLoc, ExprResult Init, bool TopLevelOfInitList=false, bool AllowExplicit=false)
Definition: SemaInit.cpp:9907
clang::Sema::IdResolver
IdentifierResolver IdResolver
Definition: Sema.h:1284
clang::Sema::CheckSpecializationInstantiationRedecl
bool CheckSpecializationInstantiationRedecl(SourceLocation NewLoc, TemplateSpecializationKind NewTSK, NamedDecl *PrevDecl, TemplateSpecializationKind PrevTSK, SourceLocation PrevPtOfInstantiation, bool &SuppressNew)
Diagnose cases where we have an explicit template specialization before/after an explicit template in...
Definition: SemaTemplate.cpp:8719
clang::Sema::isInOpenMPDeclareTargetContext
bool isInOpenMPDeclareTargetContext() const
Return true inside OpenMP declare target region.
Definition: Sema.h:11111
clang::ActionResult::get
PtrTy get() const
Definition: Ownership.h:169
clang::Sema::ActOnTypeTrait
ExprResult ActOnTypeTrait(TypeTrait Kind, SourceLocation KWLoc, ArrayRef< ParsedType > Args, SourceLocation RParenLoc)
Parsed one of the type trait support pseudo-functions.
Definition: SemaExprCXX.cpp:5415
clang::Sema::ActOnOpenMPAcquireClause
OMPClause * ActOnOpenMPAcquireClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'acquire' clause.
Definition: SemaOpenMP.cpp:16599
clang::Sema::ActOnCompoundRequirement
concepts::Requirement * ActOnCompoundRequirement(Expr *E, SourceLocation NoexceptLoc)
Definition: SemaExprCXX.cpp:8792
clang::threadSafety::BeforeSet
Definition: ThreadSafety.cpp:278
clang::Sema::SubstAutoTypeDependent
QualType SubstAutoTypeDependent(QualType TypeWithAuto)
Definition: SemaTemplateDeduction.cpp:4818
clang::Sema::DeviceDeferredDiagnostic
Definition: Sema.h:12686
clang::Sema::PushCapturedRegionScope
void PushCapturedRegionScope(Scope *RegionScope, CapturedDecl *CD, RecordDecl *RD, CapturedRegionKind K, unsigned OpenMPCaptureLevel=0)
Definition: Sema.cpp:2730
clang::Sema::BuildCoyieldExpr
ExprResult BuildCoyieldExpr(SourceLocation KwLoc, Expr *E)
Definition: SemaCoroutine.cpp:925
clang::Sema::MakeFullExpr
FullExprArg MakeFullExpr(Expr *Arg)
Definition: Sema.h:4987
clang::Sema::ActOnOpenMPNumTasksClause
OMPClause * ActOnOpenMPNumTasksClause(Expr *NumTasks, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_tasks' clause.
Definition: SemaOpenMP.cpp:21677
clang::Sema::LateInstantiatedAttribute
Definition: Sema.h:9828
clang::ClassTemplateDecl
Declaration of a class template.
Definition: DeclTemplate.h:2247
clang::ValueDecl
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:675
clang::TNK_Type_template
@ TNK_Type_template
The name refers to a template whose specialization produces a type.
Definition: TemplateKinds.h:30
clang::Sema::ExpressionEvaluationContextRecord::ParentCleanup
CleanupInfo ParentCleanup
Whether the enclosing context needed a cleanup.
Definition: Sema.h:1437
clang::Sema::BuildFunctionType
QualType BuildFunctionType(QualType T, MutableArrayRef< QualType > ParamTypes, SourceLocation Loc, DeclarationName Entity, const FunctionProtoType::ExtProtoInfo &EPI)
Build a function type.
Definition: SemaType.cpp:2891
clang::ast_matchers::castExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, CastExpr > castExpr
Matches any cast nodes of Clang's AST.
Definition: ASTMatchersInternal.cpp:975
clang::ASTContext::IntTy
CanQualType IntTy
Definition: ASTContext.h:1101
clang::Sema::tryToRecoverWithCall
bool tryToRecoverWithCall(ExprResult &E, const PartialDiagnostic &PD, bool ForceComplain=false, bool(*IsPlausibleResult)(QualType)=nullptr)
Try to recover by turning the given expression into a call.
Definition: Sema.cpp:2673
clang::Sema::PopParsingClass
void PopParsingClass(ParsingClassState state)
Definition: Sema.h:5314
clang::Sema::ActOnObjCTemporaryExitContainerContext
void ActOnObjCTemporaryExitContainerContext(DeclContext *DC)
Invoked when we must temporarily exit the objective-c container scope for parsing/looking-up C constr...
Definition: SemaDecl.cpp:16908
clang::Sema::ProcessStmtAttributes
void ProcessStmtAttributes(Stmt *Stmt, const ParsedAttributes &InAttrs, SmallVectorImpl< const Attr * > &OutAttrs)
Process the attributes before creating an attributed statement.
Definition: SemaStmtAttr.cpp:979
clang::Sema::ResolveAndFixSingleFunctionTemplateSpecialization
bool ResolveAndFixSingleFunctionTemplateSpecialization(ExprResult &SrcExpr, bool DoFunctionPointerConverion=false, bool Complain=false, SourceRange OpRangeForComplaining=SourceRange(), QualType DestTypeForComplaining=QualType(), unsigned DiagIDForComplaining=0)
Definition: SemaOverload.cpp:12619
clang::Sema::CheckFunctionTemplateSpecialization
bool CheckFunctionTemplateSpecialization(FunctionDecl *FD, TemplateArgumentListInfo *ExplicitTemplateArgs, LookupResult &Previous, bool QualifiedFriend=false)
Perform semantic analysis for the given function template specialization.
Definition: SemaTemplate.cpp:8961
clang::Sema::SubstFunctionDeclType
TypeSourceInfo * SubstFunctionDeclType(TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, CXXRecordDecl *ThisContext, Qualifiers ThisTypeQuals)
A form of SubstType intended specifically for instantiating the type of a FunctionDecl.
Definition: SemaTemplateInstantiate.cpp:2234
clang::Sema::getMismatchingDeleteExpressions
const llvm::MapVector< FieldDecl *, DeleteLocs > & getMismatchingDeleteExpressions() const
Retrieves list of suspicious delete-expressions that will be checked at the end of translation unit.
Definition: Sema.cpp:2749
clang::Sema::PragmaStack::CurrentPragmaLocation
SourceLocation CurrentPragmaLocation
Definition: Sema.h:844
clang::Sema::ActOnTemplatedFriendTag
Decl * ActOnTemplatedFriendTag(Scope *S, SourceLocation FriendLoc, unsigned TagSpec, SourceLocation TagLoc, CXXScopeSpec &SS, IdentifierInfo *Name, SourceLocation NameLoc, const ParsedAttributesView &Attr, MultiTemplateParamsArg TempParamLists)
Handle a friend tag declaration where the scope specifier was templated.
Definition: SemaDeclCXX.cpp:16713
clang::Sema::ActOnDelayedCXXMethodParameter
void ActOnDelayedCXXMethodParameter(Scope *S, Decl *Param)
ActOnDelayedCXXMethodParameter - We've already started a delayed C++ method declaration.
Definition: SemaDeclCXX.cpp:10389
clang::Sema::NC_TypeTemplate
@ NC_TypeTemplate
The name was classified as a template whose specializations are types.
Definition: Sema.h:2751
clang::Sema::TDK_InvalidExplicitArguments
@ TDK_InvalidExplicitArguments
The explicitly-specified template arguments were not valid template arguments for the given template.
Definition: Sema.h:8850
clang::Sema::completeExprArrayBound
void completeExprArrayBound(Expr *E)
Definition: SemaType.cpp:8498
clang::Sema::addSyclDeviceDecl
void addSyclDeviceDecl(Decl *d)
Definition: Sema.h:13658
clang::Sema::ActOnExpressionTrait
ExprResult ActOnExpressionTrait(ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
ActOnExpressionTrait - Parsed one of the unary type trait support pseudo-functions.
Definition: SemaExprCXX.cpp:5730
clang::Sema::MSPointerToMemberRepresentationMethod
LangOptions::PragmaMSPointersToMembersKind MSPointerToMemberRepresentationMethod
Controls member pointer representation format under the MS ABI.
Definition: Sema.h:613
clang::Sema::ForExternalRedeclaration
@ ForExternalRedeclaration
The lookup results will be used for redeclaration of a name with external linkage; non-visible lookup...
Definition: Sema.h:4365
clang::TemplateName
Represents a C++ template name within the type system.
Definition: TemplateName.h:190
clang::Sema::CodeSynthesisContext::DeclaringSpecialMember
@ DeclaringSpecialMember
We are declaring an implicit special member function.
Definition: Sema.h:9103
clang::Sema::RedeclarationKind
RedeclarationKind
Specifies whether (or how) name lookup is being performed for a redeclaration (vs.
Definition: Sema.h:4355
clang::Sema::UsesAllocatorsData
Data for list of allocators.
Definition: Sema.h:11927
clang::Sema::PragmaAttributeEntry::IsUsed
bool IsUsed
Definition: Sema.h:912
clang::ParenExpr
ParenExpr - This represents a parethesized expression, e.g.
Definition: Expr.h:2164
clang::Sema::CCK_CStyleCast
@ CCK_CStyleCast
A C-style cast.
Definition: Sema.h:11958
clang::Sema::ActOnOpenMPTaskyieldDirective
StmtResult ActOnOpenMPTaskyieldDirective(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskyield'.
Definition: SemaOpenMP.cpp:10735
clang::Sema::PragmaAttributeGroup::Namespace
const IdentifierInfo * Namespace
The namespace of this push group.
Definition: Sema.h:920
clang::Sema::LateParsedTemplateMapT
llvm::MapVector< const FunctionDecl *, std::unique_ptr< LateParsedTemplate > > LateParsedTemplateMapT
Definition: Sema.h:1075
clang::Sema::ActOnCharacterConstant
ExprResult ActOnCharacterConstant(const Token &Tok, Scope *UDLScope=nullptr)
Definition: SemaExpr.cpp:3659
clang::Sema::BuildObjCNumericLiteral
ExprResult BuildObjCNumericLiteral(SourceLocation AtLoc, Expr *Number)
BuildObjCNumericLiteral - builds an ObjCBoxedExpr AST node for the numeric literal expression.
Definition: SemaExprObjC.cpp:316
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3900
clang::Sema::AlignPackInfo::IsAlignAttr
bool IsAlignAttr() const
Definition: Sema.h:718
clang::Sema::CodeCompleteObjCClassMessage
void CodeCompleteObjCClassMessage(Scope *S, ParsedType Receiver, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression, bool IsSuper=false)
Definition: SemaCodeComplete.cpp:7998
clang::Sema::CheckShadowingDeclModification
void CheckShadowingDeclModification(Expr *E, SourceLocation Loc)
Warn if 'E', which is an expression that is about to be modified, refers to a shadowing declaration.
Definition: SemaDecl.cpp:7999
clang::Sema::DeclareImplicitEqualityComparison
void DeclareImplicitEqualityComparison(CXXRecordDecl *RD, FunctionDecl *Spaceship)
Definition: SemaDeclCXX.cpp:8771
clang::Sema::hasVisibleDeclaration
bool hasVisibleDeclaration(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine whether any declaration of an entity is visible.
Definition: Sema.h:2541
clang::ObjCImplDecl
Definition: DeclObjC.h:2418
clang::Sema::WarnConflictingTypedMethods
void WarnConflictingTypedMethods(ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
Definition: SemaDeclObjC.cpp:2565
clang::Sema::inferObjCARCLifetime
bool inferObjCARCLifetime(ValueDecl *decl)
Definition: SemaDecl.cpp:6540
clang::Sema::ActOnOpenMPSingleExprWithArgClause
OMPClause * ActOnOpenMPSingleExprWithArgClause(OpenMPClauseKind Kind, ArrayRef< unsigned > Arguments, Expr *Expr, SourceLocation StartLoc, SourceLocation LParenLoc, ArrayRef< SourceLocation > ArgumentsLoc, SourceLocation DelimLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:16170
clang::Sema::TemplateNameKindForDiagnostics::FunctionTemplate
@ FunctionTemplate
clang::Sema::PSK_DataSeg
@ PSK_DataSeg
Definition: Sema.h:10403
clang::Sema::getPrintable
static const char * getPrintable(const char *S)
Definition: Sema.h:2380
clang::Sema::CheckEnableIf
EnableIfAttr * CheckEnableIf(FunctionDecl *Function, SourceLocation CallLoc, ArrayRef< Expr * > Args, bool MissingImplicitThis=false)
Check the enable_if expressions on the given function.
Definition: SemaOverload.cpp:6709
clang::Sema::CompatiblePointerDiscardsQualifiers
@ CompatiblePointerDiscardsQualifiers
CompatiblePointerDiscardsQualifiers - The assignment discards c/v/r qualifiers, which we accept as an...
Definition: Sema.h:12143
clang::Sema::ParseObjCSelectorExpression
ExprResult ParseObjCSelectorExpression(Selector Sel, SourceLocation AtLoc, SourceLocation SelLoc, SourceLocation LParenLoc, SourceLocation RParenLoc, bool WarnMultipleSelectors)
ParseObjCSelectorExpression - Build selector expression for @selector.
Definition: SemaExprObjC.cpp:1293
clang::Sema::shouldIgnoreInHostDeviceCheck
bool shouldIgnoreInHostDeviceCheck(FunctionDecl *Callee)
Definition: SemaDecl.cpp:18931
clang::Expr::getExprLoc
SourceLocation getExprLoc() const LLVM_READONLY
getExprLoc - Return the preferred location for the arrow when diagnosing a problem with a generic exp...
Definition: Expr.cpp:246
clang::Sema::SubstTemplateParams
TemplateParameterList * SubstTemplateParams(TemplateParameterList *Params, DeclContext *Owner, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiateDecl.cpp:4431
clang::Sema::CheckUsingDeclQualifier
bool CheckUsingDeclQualifier(SourceLocation UsingLoc, bool HasTypename, const CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, SourceLocation NameLoc, const LookupResult *R=nullptr, const UsingDecl *UD=nullptr)
Checks that the given nested-name qualifier used in a using decl in the current context is appropriat...
Definition: SemaDeclCXX.cpp:12719
clang::Sema::CheckTemplatePartialSpecialization
void CheckTemplatePartialSpecialization(ClassTemplatePartialSpecializationDecl *Partial)
Definition: SemaTemplate.cpp:4258
clang::Sema::getCurrentClass
CXXRecordDecl * getCurrentClass(Scope *S, const CXXScopeSpec *SS)
Get the class that is directly named by the current context.
Definition: SemaDeclCXX.cpp:2406
clang::Sema::getPrintable
static bool getPrintable(bool B)
Definition: Sema.h:2379
clang::TemplateDecl
The base class of all kinds of template declarations (e.g., class, function, etc.).
Definition: DeclTemplate.h:400
clang::Sema::PerformMoveOrCopyInitialization
ExprResult PerformMoveOrCopyInitialization(const InitializedEntity &Entity, const NamedReturnInfo &NRInfo, Expr *Value, bool SupressSimplerImplicitMoves=false)
Perform the initialization of a potentially-movable value, which is the result of return value.
Definition: SemaStmt.cpp:3511
clang::Sema::ActOnTypeConstraint
bool ActOnTypeConstraint(const CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc)
Definition: SemaTemplate.cpp:1103
clang::Sema::SubstAutoTypeSourceInfoDependent
TypeSourceInfo * SubstAutoTypeSourceInfoDependent(TypeSourceInfo *TypeWithAuto)
Definition: SemaTemplateDeduction.cpp:4824
clang::Sema::ActOnSYCLBuiltinNumFieldsExpr
ExprResult ActOnSYCLBuiltinNumFieldsExpr(ParsedType PT)
Get the number of fields or captures within the parsed type.
Definition: SemaSYCL.cpp:144
clang::VarTemplatePartialSpecializationDecl
Definition: DeclTemplate.h:2925
llvm::DenseMapInfo< clang::Sema::FunctionDeclAndLoc >::getEmptyKey
static FunctionDeclAndLoc getEmptyKey()
Definition: Sema.h:13867
clang::Sema::CheckPointerToMemberOperands
QualType CheckPointerToMemberOperands(ExprResult &LHS, ExprResult &RHS, ExprValueKind &VK, SourceLocation OpLoc, bool isIndirect)
Definition: SemaExprCXX.cpp:5770
clang::CXXDeleteExpr
Represents a delete expression for memory deallocation and destructor calls, e.g.
Definition: ExprCXX.h:2415
clang::Sema::CheckNonDependentConversions
bool CheckNonDependentConversions(FunctionTemplateDecl *FunctionTemplate, ArrayRef< QualType > ParamTypes, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, ConversionSequenceList &Conversions, bool SuppressUserConversions, CXXRecordDecl *ActingContext=nullptr, QualType ObjectType=QualType(), Expr::Classification ObjectClassification={}, OverloadCandidateParamOrder PO={})
Check that implicit conversion sequences can be formed for each argument whose corresponding paramete...
Definition: SemaOverload.cpp:7220
clang::Sema::isInOpenMPTargetExecutionDirective
bool isInOpenMPTargetExecutionDirective() const
Return true inside OpenMP target region.
Definition: SemaOpenMP.cpp:2178
clang::Sema::ActOnCXXNestedNameSpecifierDecltype
bool ActOnCXXNestedNameSpecifierDecltype(CXXScopeSpec &SS, const DeclSpec &DS, SourceLocation ColonColonLoc)
Definition: SemaCXXScopeSpec.cpp:864
clang::Sema::isKnownName
bool isKnownName(StringRef name)
Definition: SemaExprObjC.cpp:3742
TypeOrdering.h
clang::Sema::adjustMemberFunctionCC
void adjustMemberFunctionCC(QualType &T, bool IsStatic, bool IsCtorOrDtor, SourceLocation Loc)
Adjust the calling convention of a method to be the ABI default if it wasn't specified explicitly.
Definition: SemaType.cpp:7852
clang::Sema::DiagnoseNonDefaultPragmaAlignPack
void DiagnoseNonDefaultPragmaAlignPack(PragmaAlignPackDiagnoseKind Kind, SourceLocation IncludeLoc)
Definition: SemaAttr.cpp:387
clang::Sema::BuildCaptureInit
ExprResult BuildCaptureInit(const sema::Capture &Capture, SourceLocation ImplicitCaptureLoc, bool IsOpenMPMapping=false)
Initialize the given capture with a suitable expression.
Definition: SemaLambda.cpp:1568
clang::Sema::ActOnFinishDelayedAttribute
void ActOnFinishDelayedAttribute(Scope *S, Decl *D, ParsedAttributes &Attrs)
ActOnFinishDelayedAttribute - Invoked when we have finished parsing an attribute for which parsing is...
Definition: SemaDecl.cpp:15103
Begin
SourceLocation Begin
Definition: USRLocFinder.cpp:165
clang::Sema::Private
@ Private
The private module fragment, between 'module :private;' and the end of the translation unit.
Definition: Sema.h:2121
clang::Sema::CreateUnresolvedLookupExpr
ExprResult CreateUnresolvedLookupExpr(CXXRecordDecl *NamingClass, NestedNameSpecifierLoc NNSLoc, DeclarationNameInfo DNI, const UnresolvedSetImpl &Fns, bool PerformADL=true)
Definition: SemaOverload.cpp:13308
llvm::ArrayRef
Definition: LLVM.h:34
clang::Sema::ACK_Conditional
@ ACK_Conditional
A conditional (?:) operator.
Definition: Sema.h:12092
clang::Sema::getSyclIntegrationFooter
SYCLIntegrationFooter & getSyclIntegrationFooter()
Definition: Sema.h:13668
clang::Sema::InstantiateMemInitializers
void InstantiateMemInitializers(CXXConstructorDecl *New, const CXXConstructorDecl *Tmpl, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiateDecl.cpp:5993
clang::Sema::setTagNameForLinkagePurposes
void setTagNameForLinkagePurposes(TagDecl *TagFromDeclSpec, TypedefNameDecl *NewTD)
Definition: SemaDecl.cpp:4696
clang::Sema::AR_inaccessible
@ AR_inaccessible
Definition: Sema.h:7716
clang::Sema::NTK_NonUnion
@ NTK_NonUnion
Definition: Sema.h:3358
clang::OpenMPDefaultmapClauseModifier
OpenMPDefaultmapClauseModifier
OpenMP modifiers for 'defaultmap' clause.
Definition: OpenMPKinds.h:118
Value
Value
Definition: UninitializedValues.cpp:102
clang::Sema::ProduceCallSignatureHelp
QualType ProduceCallSignatureHelp(Expr *Fn, ArrayRef< Expr * > Args, SourceLocation OpenParLoc)
Determines the preferred type of the current function argument, by examining the signatures of all po...
Definition: SemaCodeComplete.cpp:5995
clang::Sema::CheckExceptionSpecSubset
bool CheckExceptionSpecSubset(const PartialDiagnostic &DiagID, const PartialDiagnostic &NestedDiagID, const PartialDiagnostic &NoteID, const PartialDiagnostic &NoThrowDiagID, const FunctionProtoType *Superset, SourceLocation SuperLoc, const FunctionProtoType *Subset, SourceLocation SubLoc)
CheckExceptionSpecSubset - Check whether the second function type's exception specification is a subs...
Definition: SemaExceptionSpec.cpp:765
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:83
clang::Sema::CXXInvalid
@ CXXInvalid
Definition: Sema.h:1676
clang::Sema::NoFold
@ NoFold
Definition: Sema.h:12643
clang::AttributeCommonInfo
Definition: AttributeCommonInfo.h:22
clang::Sema::AA_Passing_CFAudited
@ AA_Passing_CFAudited
Definition: Sema.h:3754
clang::Sema::CheckTemplateParameterList
bool CheckTemplateParameterList(TemplateParameterList *NewParams, TemplateParameterList *OldParams, TemplateParamListContext TPC, SkipBodyInfo *SkipBody=nullptr)
Checks the validity of a template parameter list, possibly considering the template parameter list fr...
Definition: SemaTemplate.cpp:2669
clang::Sema::AddSYCLUsesAspectsAttr
void AddSYCLUsesAspectsAttr(Decl *D, const AttributeCommonInfo &CI, Expr **Exprs, unsigned Size)
clang::Sema::PopFunctionScopeInfo
PoppedFunctionScopePtr PopFunctionScopeInfo(const sema::AnalysisBasedWarnings::Policy *WP=nullptr, const Decl *D=nullptr, QualType BlockType=QualType())
Pop a function (or block or lambda or captured region) scope from the stack.
Definition: Sema.cpp:2294
clang::Sema::AddSurrogateCandidate
void AddSurrogateCandidate(CXXConversionDecl *Conversion, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, const FunctionProtoType *Proto, Expr *Object, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
AddSurrogateCandidate - Adds a "surrogate" candidate function that converts the given Object to a fun...
Definition: SemaOverload.cpp:7581
Scope.h
clang::Sema::ConditionResult::get
std::pair< VarDecl *, Expr * > get() const
Definition: Sema.h:12549
clang::Sema::AssociatedClassSet
llvm::SmallSetVector< CXXRecordDecl *, 16 > AssociatedClassSet
Definition: Sema.h:3982
clang::ObjCPropertyQueryKind
ObjCPropertyQueryKind
Definition: DeclObjC.h:720
clang::Sema::getLocationOfStringLiteralByte
SourceLocation getLocationOfStringLiteralByte(const StringLiteral *SL, unsigned ByteNo) const
Definition: SemaChecking.cpp:106
clang::Sema::ActOnFinishOfCompoundStmt
void ActOnFinishOfCompoundStmt()
Definition: SemaStmt.cpp:401
clang::Sema::ActOnIfStmt
StmtResult ActOnIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
Definition: SemaStmt.cpp:869
clang::EnterExpressionEvaluationContext
RAII object that enters a new expression evaluation context.
Definition: Sema.h:13792
clang::Sema::PerformDependentDiagnostics
void PerformDependentDiagnostics(const DeclContext *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiateDecl.cpp:6782
clang::Sema::PragmaAttributeStack
SmallVector< PragmaAttributeGroup, 2 > PragmaAttributeStack
Definition: Sema.h:924
clang::Sema::BuildClassMessage
ExprResult BuildClassMessage(TypeSourceInfo *ReceiverTypeInfo, QualType ReceiverType, SourceLocation SuperLoc, Selector Sel, ObjCMethodDecl *Method, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args, bool isImplicit=false)
Build an Objective-C class message expression.
Definition: SemaExprObjC.cpp:2606
clang::DeclaratorDecl
Represents a ValueDecl that came out of a declarator.
Definition: Decl.h:727
clang::Sema::BuildVariableInstantiation
void BuildVariableInstantiation(VarDecl *NewVar, VarDecl *OldVar, const MultiLevelTemplateArgumentList &TemplateArgs, LateInstantiatedAttrVec *LateAttrs, DeclContext *Owner, LocalInstantiationScope *StartingScope, bool InstantiatingVarTemplate=false, VarTemplateSpecializationDecl *PrevVTSD=nullptr)
BuildVariableInstantiation - Used after a new variable has been created.
Definition: SemaTemplateInstantiateDecl.cpp:5564
clang::Sema::CodeCompleteTag
void CodeCompleteTag(Scope *S, unsigned TagSpec)
Definition: SemaCodeComplete.cpp:5736
clang::Sema::ActOnStartStmtExpr
void ActOnStartStmtExpr()
Definition: SemaExpr.cpp:15571
clang::TypeLoc
Base wrapper for a particular "section" of type source info.
Definition: TypeLoc.h:58
clang::Sema::hasStructuralCompatLayout
bool hasStructuralCompatLayout(Decl *D, Decl *Suggested)
Determine if D and Suggested have a structurally compatible layout as described in C11 6....
Definition: SemaType.cpp:8615
clang::Sema::ActOnPragmaMSComment
void ActOnPragmaMSComment(SourceLocation CommentLoc, PragmaMSCommentKind Kind, StringRef Arg)
ActOnPragmaMSComment - Called on well formed #pragma comment(kind, "arg").
Definition: SemaAttr.cpp:457
clang::Sema::checkThisInStaticMemberFunctionType
bool checkThisInStaticMemberFunctionType(CXXMethodDecl *Method)
Check whether 'this' shows up in the type of a static member function after the (naturally empty) cv-...
Definition: SemaDeclCXX.cpp:18038
clang::Sema::CreateOverloadedUnaryOp
ExprResult CreateOverloadedUnaryOp(SourceLocation OpLoc, UnaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *input, bool RequiresADL=true)
Create a unary operation that may resolve to an overloaded operator.
Definition: SemaOverload.cpp:13334
clang::ObjCPropertyDecl
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:732
clang::Sema::CheckDestructorDeclarator
QualType CheckDestructorDeclarator(Declarator &D, QualType R, StorageClass &SC)
CheckDestructorDeclarator - Called by ActOnDeclarator to check the well-formednes of the destructor d...
Definition: SemaDeclCXX.cpp:10606
clang::Sema::CheckSizelessVectorOperands
QualType CheckSizelessVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, ArithConvKind OperationKind)
Definition: SemaExpr.cpp:10564
clang::FunctionType::ExtParameterInfo
Interesting information about a specific parameter that can't simply be reflected in parameter's type...
Definition: Type.h:3587
clang::Sema::TentativeAnalysisScope::TentativeAnalysisScope
TentativeAnalysisScope(Sema &SemaRef)
Definition: Sema.h:9569
clang::Sema::ActOnOpenMPLoopInitialization
void ActOnOpenMPLoopInitialization(SourceLocation ForLoc, Stmt *Init)
Check if the current region is an OpenMP loop region and if it is, mark loop control variable,...
Definition: SemaOpenMP.cpp:8752
clang::Sema::findLocallyScopedExternCDecl
NamedDecl * findLocallyScopedExternCDecl(DeclarationName Name)
Look for a locally scoped extern "C" declaration by the given name.
Definition: SemaDecl.cpp:6326
clang::Sema::ActOnExceptionDeclarator
Decl * ActOnExceptionDeclarator(Scope *S, Declarator &D)
ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch handler.
Definition: SemaDeclCXX.cpp:16496
clang::Sema::ActOnOpenMPTeamsDirective
StmtResult ActOnOpenMPTeamsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp teams' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12841
clang::Sema::NameClassification::NonType
static NameClassification NonType(NamedDecl *D)
Definition: Sema.h:2792
clang::Sema::ActOnTypedefDeclarator
NamedDecl * ActOnTypedefDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous)
Definition: SemaDecl.cpp:6351
clang::MakeDeductionFailureInfo
DeductionFailureInfo MakeDeductionFailureInfo(ASTContext &Context, Sema::TemplateDeductionResult TDK, sema::TemplateDeductionInfo &Info)
Convert from Sema's representation of template deduction information to the form used in overload-can...
Definition: SemaOverload.cpp:612
clang::Sema::FunctionScopeRAII::Active
bool Active
Definition: Sema.h:5031
clang::Sema::isLibstdcxxEagerExceptionSpecHack
bool isLibstdcxxEagerExceptionSpecHack(const Declarator &D)
Determine if we're in a case where we need to (incorrectly) eagerly parse an exception specification ...
Definition: SemaExceptionSpec.cpp:44
clang::Sema::SYCLRestrictKind
SYCLRestrictKind
Definition: Sema.h:13679
clang::Sema::ActOnDeclarator
Decl * ActOnDeclarator(Scope *S, Declarator &D)
Definition: SemaDecl.cpp:5799
clang::Sema::SpecialMemberDecl
llvm::PointerIntPair< CXXRecordDecl *, 3, CXXSpecialMember > SpecialMemberDecl
Definition: Sema.h:1680
clang::Sema::VerifyICEDiagnoser::Suppress
bool Suppress
Definition: Sema.h:12630
clang::Sema::TDK_MiscellaneousDeductionFailure
@ TDK_MiscellaneousDeductionFailure
Deduction failed; that's all we know.
Definition: Sema.h:8857
clang::Sema::ActOnInstanceMessage
ExprResult ActOnInstanceMessage(Scope *S, Expr *Receiver, Selector Sel, SourceLocation LBracLoc, ArrayRef< SourceLocation > SelectorLocs, SourceLocation RBracLoc, MultiExprArg Args)
Definition: SemaExprObjC.cpp:3416
clang::Sema::ActOnOpenMPTeamsDistributeSimdDirective
StmtResult ActOnOpenMPTeamsDistributeSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:13562
clang::Sema::BuildTypeRequirement
concepts::TypeRequirement * BuildTypeRequirement(TypeSourceInfo *Type)
Definition: SemaExprCXX.cpp:8892
clang::Sema::Consumer
ASTConsumer & Consumer
Definition: Sema.h:588
clang::Sema::AddBuiltinOperatorCandidates
void AddBuiltinOperatorCandidates(OverloadedOperatorKind Op, SourceLocation OpLoc, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet)
AddBuiltinOperatorCandidates - Add the appropriate built-in operator overloads to the candidate set (...
Definition: SemaOverload.cpp:9190
clang::Sema::PSK_BSSSeg
@ PSK_BSSSeg
Definition: Sema.h:10404
clang::Sema::GlobalEagerInstantiationScope::~GlobalEagerInstantiationScope
~GlobalEagerInstantiationScope()
Definition: Sema.h:9637
clang::OpenMPAtomicDefaultMemOrderClauseKind
OpenMPAtomicDefaultMemOrderClauseKind
OpenMP attributes for 'atomic_default_mem_order' clause.
Definition: OpenMPKinds.h:127
clang::Sema::DeduceAutoType
DeduceAutoResult DeduceAutoType(TypeSourceInfo *AutoType, Expr *&Initializer, QualType &Result, Optional< unsigned > DependentDeductionDepth=None, bool IgnoreConstraints=false)
Definition: SemaTemplateDeduction.cpp:4525
clang::Sema::DefaultLvalueConversion
ExprResult DefaultLvalueConversion(Expr *E)
Definition: SemaExpr.cpp:667
clang::Sema::TemplateNameKindForDiagnostics::AliasTemplate
@ AliasTemplate
clang::ArraySubscriptExpr
ArraySubscriptExpr - [C99 6.5.2.1] Array Subscripting.
Definition: Expr.h:2697
clang::DarwinSDKInfo
The information about the darwin SDK that was used during this compilation.
Definition: DarwinSDKInfo.h:28
clang::Sema::EndOpenMPDSABlock
void EndOpenMPDSABlock(Stmt *CurDirective)
Called on end of data sharing attribute block.
Definition: SemaOpenMP.cpp:2631
clang::TemplatePartialOrderingContext
Definition: Template.h:221
clang::Sema::NameClassification::DependentNonType
static NameClassification DependentNonType()
Definition: Sema.h:2802
clang::Sema::getConstructorName
ParsedType getConstructorName(IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, bool EnteringContext)
Definition: SemaExprCXX.cpp:83
clang::Sema::ActOnOpenMPLastprivateClause
OMPClause * ActOnOpenMPLastprivateClause(ArrayRef< Expr * > VarList, OpenMPLastprivateModifier LPKind, SourceLocation LPKindLoc, SourceLocation ColonLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'lastprivate' clause.
Definition: SemaOpenMP.cpp:17534
clang::Sema::ActOnFinishDelayedCXXMethodDeclaration
void ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
ActOnFinishDelayedCXXMethodDeclaration - We have finished processing the delayed method declaration f...
Definition: SemaDeclCXX.cpp:10406
clang::Sema::BuildNestedRequirement
concepts::NestedRequirement * BuildNestedRequirement(Expr *E)
Definition: SemaExprCXX.cpp:8907
clang::Sema::ActOnComment
void ActOnComment(SourceRange Comment)
Definition: Sema.cpp:2439
clang::Sema::ActOnForwardProtocolDeclaration
DeclGroupPtrTy ActOnForwardProtocolDeclaration(SourceLocation AtProtoclLoc, ArrayRef< IdentifierLocPair > IdentList, const ParsedAttributesView &attrList)
ActOnForwardProtocolDeclaration - Handle @protocol foo;.
Definition: SemaDeclObjC.cpp:1774
clang::Sema::redelayDiagnostics
void redelayDiagnostics(sema::DelayedDiagnosticPool &pool)
clang::Sema::LookupInlineAsmField
bool LookupInlineAsmField(StringRef Base, StringRef Member, unsigned &Offset, SourceLocation AsmLoc)
Definition: SemaStmtAsm.cpp:815
BitmaskEnum.h
clang::Sema::isEmptyCudaConstructor
bool isEmptyCudaConstructor(SourceLocation Loc, CXXConstructorDecl *CD)
Definition: SemaCUDA.cpp:464
clang::Sema::NSStringPointer
QualType NSStringPointer
Pointer to NSString type (NSString *).
Definition: Sema.h:1346
clang::Sema::popCodeSynthesisContext
void popCodeSynthesisContext()
Definition: SemaTemplateInstantiate.cpp:439
clang::Sema::SemaDiagnosticBuilder::K_ImmediateWithCallStack
@ K_ImmediateWithCallStack
Emit the diagnostic immediately, and, if it's a warning or error, also emit a call stack showing how ...
Definition: Sema.h:1950
clang::Sema::AFS_Class
@ AFS_Class
Only look for allocation functions in the scope of the allocated class.
Definition: Sema.h:6710
clang::Sema::FRS_NoViableFunction
@ FRS_NoViableFunction
Definition: Sema.h:4188
clang::Sema
Sema - This implements semantic analysis and AST building for C.
Definition: Sema.h:531
clang::Sema::ActOnObjCInstanceType
ParsedType ActOnObjCInstanceType(SourceLocation Loc)
The parser has parsed the context-sensitive type 'instancetype' in an Objective-C message declaration...
Definition: SemaType.cpp:6493
clang::Sema::ActOnOpenMPIdExpression
ExprResult ActOnOpenMPIdExpression(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id, OpenMPDirectiveKind Kind)
Called on correct id-expression from the '#pragma omp threadprivate'.
Definition: SemaOpenMP.cpp:2807
clang::ActionResult::isInvalid
bool isInvalid() const
Definition: Ownership.h:165
clang::Sema::DiagnosePropertyMismatch
void DiagnosePropertyMismatch(ObjCPropertyDecl *Property, ObjCPropertyDecl *SuperProperty, const IdentifierInfo *Name, bool OverridingProtocolProperty)
DiagnosePropertyMismatch - Compares two properties for their attributes and types and warns on a vari...
Definition: SemaObjCProperty.cpp:1635
clang::Sema::DiagnoseUseOfDecl
bool DiagnoseUseOfDecl(NamedDecl *D, ArrayRef< SourceLocation > Locs, const ObjCInterfaceDecl *UnknownObjCClass=nullptr, bool ObjCPropertyAccess=false, bool AvoidPartialAvailabilityChecks=false, ObjCInterfaceDecl *ClassReciever=nullptr)
Determine whether the use of this declaration is valid, and emit any corresponding diagnostics.
Definition: SemaExpr.cpp:217
clang::Sema::SemaDiagnosticBuilder::AddFixItHint
void AddFixItHint(const FixItHint &Hint) const
Definition: Sema.h:2015
clang::Sema::NC_Type
@ NC_Type
The name was classified as a type.
Definition: Sema.h:2732
clang::Sema::LateInstantiatedAttribute::Scope
LocalInstantiationScope * Scope
Definition: Sema.h:9830
clang::Sema::CheckExtraCXXDefaultArguments
void CheckExtraCXXDefaultArguments(Declarator &D)
CheckExtraCXXDefaultArguments - Check for any extra default arguments in the declarator,...
Definition: SemaDeclCXX.cpp:393
clang::Sema::TypeDiagnoser::diagnose
virtual void diagnose(Sema &S, SourceLocation Loc, QualType T)=0
clang::Sema::FunctionEmissionStatus::TemplateDiscarded
@ TemplateDiscarded
clang::Sema::mergeSwiftNameAttr
SwiftNameAttr * mergeSwiftNameAttr(Decl *D, const SwiftNameAttr &SNA, StringRef Name)
clang::Sema::getStdAlignValT
EnumDecl * getStdAlignValT() const
Definition: SemaDeclCXX.cpp:11283
clang::Sema::IvarBacksCurrentMethodAccessor
bool IvarBacksCurrentMethodAccessor(ObjCInterfaceDecl *IFace, ObjCMethodDecl *Method, ObjCIvarDecl *IV)
IvarBacksCurrentMethodAccessor - This routine returns 'true' if 'IV' is an ivar synthesized for 'Meth...
Definition: SemaObjCProperty.cpp:1837
clang::Sema::DeclareImplicitCopyAssignment
CXXMethodDecl * DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl)
Declare the implicit copy assignment operator for the given class.
Definition: SemaDeclCXX.cpp:14323
clang::Sema::PragmaAttributeGroup::Entries
SmallVector< PragmaAttributeEntry, 2 > Entries
Definition: Sema.h:921
clang::Sema::PopParsingDeclaration
void PopParsingDeclaration(ParsingDeclState state, Decl *decl)
clang::Sema::KernelUseExceptions
@ KernelUseExceptions
Definition: Sema.h:13684
clang::Sema::BuildArrayType
QualType BuildArrayType(QualType T, ArrayType::ArraySizeModifier ASM, Expr *ArraySize, unsigned Quals, SourceRange Brackets, DeclarationName Entity)
Build an array type.
Definition: SemaType.cpp:2381
clang::Sema::addFDToReachableFromSyclDevice
void addFDToReachableFromSyclDevice(const FunctionDecl *Callee, const FunctionDecl *Caller)
Definition: Sema.h:1912
clang::Sema::BuildExpressionTrait
ExprResult BuildExpressionTrait(ExpressionTrait OET, SourceLocation KWLoc, Expr *Queried, SourceLocation RParen)
Definition: SemaExprCXX.cpp:5752
clang::Sema::CodeCompleteUsingDirective
void CodeCompleteUsingDirective(Scope *S)
Definition: SemaCodeComplete.cpp:6576
clang::CodeCompleteConsumer
Abstract interface for a consumer of code-completion information.
Definition: CodeCompleteConsumer.h:1000
clang::Sema::TentativeDefinitionsType
LazyVector< VarDecl *, ExternalSemaSource, &ExternalSemaSource::ReadTentativeDefinitions, 2, 2 > TentativeDefinitionsType
Definition: Sema.h:1035
clang::Sema::ActOnConditionalOp
ExprResult ActOnConditionalOp(SourceLocation QuestionLoc, SourceLocation ColonLoc, Expr *CondExpr, Expr *LHSExpr, Expr *RHSExpr)
ActOnConditionalOp - Parse a ?: operation.
Definition: SemaExpr.cpp:9080
clang::Sema::ActOnOpenMPTargetEnterDataDirective
StmtResult ActOnOpenMPTargetEnterDataDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target enter data' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12729
clang::Sema::ActOnOpenMPDistScheduleClause
OMPClause * ActOnOpenMPDistScheduleClause(OpenMPDistScheduleClauseKind Kind, Expr *ChunkSize, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation KindLoc, SourceLocation CommaLoc, SourceLocation EndLoc)
Called on well-formed 'dist_schedule' clause.
Definition: SemaOpenMP.cpp:21775
clang::Sema::resolveAndFixAddressOfSingleOverloadCandidate
bool resolveAndFixAddressOfSingleOverloadCandidate(ExprResult &SrcExpr, bool DoFunctionPointerConversion=false)
Given an overloaded function, tries to turn it into a non-overloaded function reference using resolve...
Definition: SemaOverload.cpp:12501
clang::Sema::InstantiateDefaultCtorDefaultArgs
void InstantiateDefaultCtorDefaultArgs(CXXConstructorDecl *Ctor)
In the MS ABI, we need to instantiate default arguments of dllexported default constructors along wit...
Definition: SemaTemplateInstantiateDecl.cpp:1233
clang::Sema::BuildUnaryOp
ExprResult BuildUnaryOp(Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opc, Expr *Input)
Definition: SemaExpr.cpp:15513
clang::Sema::TentativeAnalysisScope::~TentativeAnalysisScope
~TentativeAnalysisScope()
Definition: Sema.h:9574
clang::Sema::handlerCanCatch
bool handlerCanCatch(QualType HandlerType, QualType ExceptionType)
Definition: SemaExceptionSpec.cpp:678
clang::SYCLIntegrationFooter::addVarDecl
void addVarDecl(const VarDecl *VD)
Definition: SemaSYCL.cpp:4849
clang::Sema::CodeSynthesisContext::ConstraintsCheck
@ ConstraintsCheck
Definition: Sema.h:9117
clang::Sema::SemaDiagnosticBuilder::ExprError
friend ExprResult ExprError(const SemaDiagnosticBuilder &)
Definition: Sema.h:2023
clang::Sema::AddSYCLIntelSchedulerTargetFmaxMhzAttr
void AddSYCLIntelSchedulerTargetFmaxMhzAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::SubstInitializer
ExprResult SubstInitializer(Expr *E, const MultiLevelTemplateArgumentList &TemplateArgs, bool CXXDirectInit)
Definition: SemaTemplateInstantiate.cpp:3579
clang::ClassTemplateDecl::getTemplatedDecl
CXXRecordDecl * getTemplatedDecl() const
Get the underlying class declarations of the template.
Definition: DeclTemplate.h:2295
clang::LazyVector
Represents a lazily-loaded vector of data.
Definition: ExternalASTSource.h:493
clang::Sema::ActOnOpenMPIsDevicePtrClause
OMPClause * ActOnOpenMPIsDevicePtrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'is_device_ptr' clause.
Definition: SemaOpenMP.cpp:22348
clang::Sema::CCEKind
CCEKind
Contexts in which a converted constant expression is required.
Definition: Sema.h:3862
clang::Sema::diagnoseNullableToNonnullConversion
void diagnoseNullableToNonnullConversion(QualType DstType, QualType SrcType, SourceLocation Loc)
Warn if we're implicitly casting from a _Nullable pointer type to a _Nonnull one.
Definition: Sema.cpp:609
clang::Sema::IsIntegralPromotion
bool IsIntegralPromotion(Expr *From, QualType FromType, QualType ToType)
IsIntegralPromotion - Determines whether the conversion from the expression From (whose potentially-a...
Definition: SemaOverload.cpp:2078
clang::Sema::NameClassification::VarTemplate
static NameClassification VarTemplate(TemplateName Name)
Definition: Sema.h:2812
clang::Sema::LookupRedeclarationWithLinkage
@ LookupRedeclarationWithLinkage
Look up an ordinary name that is going to be redeclared as a name with linkage.
Definition: Sema.h:4337
clang::Sema::RequiredTemplateKind::getTemplateKeywordLoc
SourceLocation getTemplateKeywordLoc() const
Definition: Sema.h:7861
clang::Sema::TransformToPotentiallyEvaluated
ExprResult TransformToPotentiallyEvaluated(Expr *E)
Definition: SemaExpr.cpp:17002
clang::Sema::DiagnoseUseOfUnimplementedSelectors
void DiagnoseUseOfUnimplementedSelectors()
Definition: SemaDeclObjC.cpp:5237
clang::Sema::DiagnoseUninstantiableTemplate
bool DiagnoseUninstantiableTemplate(SourceLocation PointOfInstantiation, NamedDecl *Instantiation, bool InstantiatedFromMember, const NamedDecl *Pattern, const NamedDecl *PatternDef, TemplateSpecializationKind TSK, bool Complain=true)
Determine whether we would be unable to instantiate this template (because it either has no definitio...
Definition: SemaTemplate.cpp:782
clang::UnaryOperatorKind
UnaryOperatorKind
Definition: OperationKinds.h:30
clang::Sema::CheckSubtractionOperands
QualType CheckSubtractionOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, QualType *CompLHSTy=nullptr)
Definition: SemaExpr.cpp:11195
clang::Sema::~Sema
~Sema()
Definition: Sema.cpp:496
clang::Sema::OMPIteratorData
Data structure for iterator expression.
Definition: Sema.h:5718
clang::Sema::PragmaStack::Slot::PragmaLocation
SourceLocation PragmaLocation
Definition: Sema.h:771
clang::Sema::NullabilityMap
FileNullabilityMap NullabilityMap
A mapping that describes the nullability we've seen in each header file.
Definition: Sema.h:898
clang::Sema::ActOnOpenMPCall
ExprResult ActOnOpenMPCall(ExprResult Call, Scope *Scope, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig)
Given the potential call expression Call, determine if there is a specialization via the OpenMP decla...
Definition: SemaOpenMP.cpp:6917
clang::PreferredTypeBuilder::enterParenExpr
void enterParenExpr(SourceLocation Tok, SourceLocation LParLoc)
Definition: SemaCodeComplete.cpp:436
clang::Sema::CodeSynthesisContext::DefaultTemplateArgumentChecking
@ DefaultTemplateArgumentChecking
We are checking the validity of a default template argument that has been used when naming a template...
Definition: Sema.h:9085
clang::Sema::BuildSYCLIntelFPGASpeculatedIterationsAttr
SYCLIntelFPGASpeculatedIterationsAttr * BuildSYCLIntelFPGASpeculatedIterationsAttr(const AttributeCommonInfo &CI, Expr *E)
Definition: SemaStmtAttr.cpp:188
clang::Sema::CheckObjCDeclScope
bool CheckObjCDeclScope(Decl *D)
Checks that the Objective-C declaration is declared in the global scope.
Definition: SemaDeclObjC.cpp:5063
clang::Sema::DelayedDllExportClasses
SmallVector< CXXRecordDecl *, 4 > DelayedDllExportClasses
Definition: Sema.h:13544
clang::Sema::ActOnOpenMPOrderedDirective
StmtResult ActOnOpenMPOrderedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp ordered' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10858
clang::Sema::isOpenMPPrivateDecl
OpenMPClauseKind isOpenMPPrivateDecl(ValueDecl *D, unsigned Level, unsigned CapLevel) const
Check if the specified variable is used in 'private' clause.
Definition: SemaOpenMP.cpp:2325
clang::Sema::VerifyICEDiagnoser::diagnoseFold
virtual SemaDiagnosticBuilder diagnoseFold(Sema &S, SourceLocation Loc)
Definition: SemaExpr.cpp:16809
clang::Sema::LookupMovingConstructor
CXXConstructorDecl * LookupMovingConstructor(CXXRecordDecl *Class, unsigned Quals)
Look up the moving constructor for the given class.
Definition: SemaLookup.cpp:3369
clang::Sema::LateTemplateParserCleanupCB
void LateTemplateParserCleanupCB(void *P)
Definition: Sema.h:1080
clang::Sema::VTableUse
std::pair< CXXRecordDecl *, SourceLocation > VTableUse
The list of classes whose vtables have been used within this translation unit, and the source locatio...
Definition: Sema.h:7495
clang::Sema::AA_Initializing
@ AA_Initializing
Definition: Sema.h:3751
clang::Sema::DeleteExprs
llvm::MapVector< FieldDecl *, DeleteLocs > DeleteExprs
Definition: Sema.h:1017
clang::Sema::checkAddressOfFunctionIsAvailable
bool checkAddressOfFunctionIsAvailable(const FunctionDecl *Function, bool Complain=false, SourceLocation Loc=SourceLocation())
Returns whether the given function's address can be taken or not, optionally emitting a diagnostic if...
Definition: SemaOverload.cpp:10333
clang::Sema::ImmediateDiagBuilder::~ImmediateDiagBuilder
~ImmediateDiagBuilder()
Definition: Sema.h:1836
clang::Sema::Normal
@ Normal
A normal translation unit fragment.
Definition: Sema.h:2118
clang::Sema::CheckCXXThrowOperand
bool CheckCXXThrowOperand(SourceLocation ThrowLoc, QualType ThrowTy, Expr *E)
CheckCXXThrowOperand - Validate the operand of a throw.
Definition: SemaExprCXX.cpp:967
clang::Sema::FST_NSString
@ FST_NSString
Definition: Sema.h:13324
clang::Sema::SubstituteExplicitTemplateArguments
TemplateDeductionResult SubstituteExplicitTemplateArguments(FunctionTemplateDecl *FunctionTemplate, TemplateArgumentListInfo &ExplicitTemplateArgs, SmallVectorImpl< DeducedTemplateArgument > &Deduced, SmallVectorImpl< QualType > &ParamTypes, QualType *FunctionType, sema::TemplateDeductionInfo &Info)
Substitute the explicitly-provided template arguments into the given function template according to C...
Definition: SemaTemplateDeduction.cpp:3083
clang::Sema::ResultTypeCompatibilityKind
ResultTypeCompatibilityKind
Describes the compatibility of a result type with its method.
Definition: Sema.h:10338
clang::SYCLIntegrationHeader::addDeviceGlobalRegistration
void addDeviceGlobalRegistration()
Signals that emission of __sycl_device_global_registration type and declaration of variable __sycl_de...
Definition: Sema.h:366
clang::Sema::ActOnDecompositionDeclarator
NamedDecl * ActOnDecompositionDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists)
Definition: SemaDeclCXX.cpp:711
clang::Sema::isConstantEvaluated
bool isConstantEvaluated()
Definition: Sema.h:1206
clang::ParsedAttributes
ParsedAttributes - A collection of parsed attributes.
Definition: ParsedAttr.h:1006
clang::Sema::CodeSynthesisContext::InstantiationRange
SourceRange InstantiationRange
The source range that covers the construct that cause the instantiation, e.g., the template-id that c...
Definition: Sema.h:9185
clang::TemplateArgumentList
A template argument list.
Definition: DeclTemplate.h:237
clang::Sema::TrivialABIHandling
TrivialABIHandling
Definition: Sema.h:3437
clang::Module::isModulePurview
bool isModulePurview() const
Does this Module scope describe part of the purview of a named C++ module?
Definition: Module.h:161
clang::Sema::checkThisInStaticMemberFunctionAttributes
bool checkThisInStaticMemberFunctionAttributes(CXXMethodDecl *Method)
Check whether 'this' shows up in the attributes of the given static member function.
Definition: SemaDeclCXX.cpp:18117
clang::Sema::RespondsToSelectorSel
Selector RespondsToSelectorSel
will hold 'respondsToSelector:'
Definition: Sema.h:1370
clang::Sema::PushOnScopeChains
void PushOnScopeChains(NamedDecl *D, Scope *S, bool AddToContext=true)
Add this decl to the scope shadowed decl chains.
Definition: SemaDecl.cpp:1498
clang::Sema::BuildQualifiedDeclarationNameExpr
ExprResult BuildQualifiedDeclarationNameExpr(CXXScopeSpec &SS, const DeclarationNameInfo &NameInfo, bool IsAddressOfOperand, const Scope *S, TypeSourceInfo **RecoveryTSI=nullptr)
BuildQualifiedDeclarationNameExpr - Build a C++ qualified declaration name, generally during template...
Definition: SemaExpr.cpp:2746
clang::Sema::RequireLiteralType
bool RequireLiteralType(SourceLocation Loc, QualType T, TypeDiagnoser &Diagnoser)
Ensure that the type T is a literal type.
Definition: SemaType.cpp:8961
clang::Sema::InstantiateFunctionDeclaration
FunctionDecl * InstantiateFunctionDeclaration(FunctionTemplateDecl *FTD, const TemplateArgumentList *Args, SourceLocation Loc)
Instantiate (or find existing instantiation of) a function template with a given set of template argu...
Definition: SemaTemplateInstantiateDecl.cpp:5143
clang::Sema::LocalEagerInstantiationScope
Definition: Sema.h:9675
clang::Sema::OriginalCallArg::OriginalParamType
QualType OriginalParamType
Definition: Sema.h:8888
clang::Sema::NameClassification::getType
ParsedType getType() const
Definition: Sema.h:2843
clang::Sema::AssumedTemplateKind::FoundFunctions
@ FoundFunctions
This is assumed to be a template name because lookup found one or more functions (but no function tem...
clang::Sema::OCK_CategoryImplementation
@ OCK_CategoryImplementation
Definition: Sema.h:9949
clang::Sema::emitDeferredDiags
void emitDeferredDiags()
Definition: Sema.cpp:1856
clang::Sema::ActOnIndirectGotoStmt
StmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc, SourceLocation StarLoc, Expr *DestExp)
Definition: SemaStmt.cpp:3274
clang::Sema::CFT_Device
@ CFT_Device
Definition: Sema.h:12801
clang::Sema::ReferenceConversionsScope::Qualification
@ Qualification
Definition: Sema.h:12407
clang::Sema::AddSYCLAddIRAttributesKernelParameterAttr
void AddSYCLAddIRAttributesKernelParameterAttr(Decl *D, const AttributeCommonInfo &CI, MutableArrayRef< Expr * > Args)
clang::Sema::GlobalEagerInstantiationScope
Definition: Sema.h:9620
clang::Sema::BuildObjCBoxedExpr
ExprResult BuildObjCBoxedExpr(SourceRange SR, Expr *ValueExpr)
BuildObjCBoxedExpr - builds an ObjCBoxedExpr AST node for the '@' prefixed parenthesized expression.
Definition: SemaExprObjC.cpp:500
clang::Sema::isAcceptableNestedNameSpecifier
bool isAcceptableNestedNameSpecifier(const NamedDecl *SD, bool *CanCorrect=nullptr)
Determines whether the given declaration is an valid acceptable result for name lookup of a nested-na...
Definition: SemaCXXScopeSpec.cpp:328
clang::Sema::ContextRAII
A RAII object to temporarily push a declaration context.
Definition: Sema.h:1156
clang::Sema::startOpenMPCXXRangeFor
void startOpenMPCXXRangeFor()
If the current region is a range loop-based region, mark the start of the loop construct.
Definition: SemaOpenMP.cpp:2317
clang::Sema::ActOnNumericConstant
ExprResult ActOnNumericConstant(const Token &Tok, Scope *UDLScope=nullptr)
Definition: SemaExpr.cpp:3782
clang::Sema::DeclareGlobalNewDelete
void DeclareGlobalNewDelete()
DeclareGlobalNewDelete - Declare the global forms of operator new and delete.
Definition: SemaExprCXX.cpp:2949
clang::Sema::KernelConstStaticVariable
@ KernelConstStaticVariable
Definition: Sema.h:13692
clang::Sema::ActOnOpenMPUseDevicePtrClause
OMPClause * ActOnOpenMPUseDevicePtrClause(ArrayRef< Expr * > VarList, const OMPVarListLocTy &Locs)
Called on well-formed 'use_device_ptr' clause.
Definition: SemaOpenMP.cpp:22211
clang::Sema::CodeCompletePostfixExpression
void CodeCompletePostfixExpression(Scope *S, ExprResult LHS, QualType PreferredType)
Definition: SemaCodeComplete.cpp:4791
clang::Sema::ActOnArrayTypeTrait
ExprResult ActOnArrayTypeTrait(ArrayTypeTrait ATT, SourceLocation KWLoc, ParsedType LhsTy, Expr *DimExpr, SourceLocation RParen)
ActOnArrayTypeTrait - Parsed one of the binary type trait support pseudo-functions.
Definition: SemaExprCXX.cpp:5641
clang::Sema::ActOnFileScopeAsmDecl
Decl * ActOnFileScopeAsmDecl(Expr *expr, SourceLocation AsmLoc, SourceLocation RParenLoc)
Definition: SemaDecl.cpp:18745
clang::Sema::CheckVectorOperands
QualType CheckVectorOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, bool IsCompAssign, bool AllowBothBool, bool AllowBoolConversion, bool AllowBoolOperation, bool ReportInvalid)
type checking for vector binary operators.
Definition: SemaExpr.cpp:10347
clang::BinaryOperatorKind
BinaryOperatorKind
Definition: OperationKinds.h:25
clang::Sema::checkTargetClonesAttrString
bool checkTargetClonesAttrString(SourceLocation LiteralLoc, StringRef Str, const StringLiteral *Literal, bool &HasDefault, bool &HasCommas, SmallVectorImpl< StringRef > &Strings)
clang::Sema::FunctionScopeRAII
An RAII helper that pops function a function scope on exit.
Definition: Sema.h:5029
clang::Sema::ReferenceConversionsScope::NestedQualification
@ NestedQualification
Definition: Sema.h:12408
clang::Sema::LookupSingleName
NamedDecl * LookupSingleName(Scope *S, DeclarationName Name, SourceLocation Loc, LookupNameKind NameKind, RedeclarationKind Redecl=NotForRedeclaration)
Look up a name, looking for a single declaration.
Definition: SemaLookup.cpp:3094
clang::Sema::CurrentInstantiationScope
LocalInstantiationScope * CurrentInstantiationScope
The current instantiation scope used to store local variables.
Definition: Sema.h:9581
clang::Sema::DiagnoseUnknownTypeName
void DiagnoseUnknownTypeName(IdentifierInfo *&II, SourceLocation IILoc, Scope *S, CXXScopeSpec *SS, ParsedType &SuggestedType, bool IsTemplateName=false)
Definition: SemaDecl.cpp:680
clang::Sema::DelayedDiagnosticsState
Definition: Sema.h:1095
clang::Sema::NameClassification::Unknown
static NameClassification Unknown()
Definition: Sema.h:2782
clang::Sema::getCurFunctionAvailabilityContext
sema::FunctionScopeInfo * getCurFunctionAvailabilityContext()
Retrieve the current function, if any, that should be analyzed for potential availability violations.
Definition: SemaAvailability.cpp:908
clang::Sema::getCurMethodDecl
ObjCMethodDecl * getCurMethodDecl()
getCurMethodDecl - If inside of a method body, this returns a pointer to the method decl for the meth...
Definition: Sema.cpp:1498
clang::Sema::PrintStats
void PrintStats() const
Print out statistics about the semantic analysis.
Definition: Sema.cpp:601
clang::Sema::ActOnOpenMPProcBindClause
OMPClause * ActOnOpenMPProcBindClause(llvm::omp::ProcBindKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'proc_bind' clause.
Definition: SemaOpenMP.cpp:16038
clang::Sema::AbstractVariableType
@ AbstractVariableType
Definition: Sema.h:7803
clang::Sema::AlignPackInfo::AlignPackInfo
AlignPackInfo(AlignPackInfo::Mode M, bool IsXL)
Definition: Sema.h:678
clang::sema::TemplateDeductionInfo
Provides information about an attempted template argument deduction, whose success or failure was des...
Definition: TemplateDeduction.h:42
clang::Sema::CreateBuiltin
FunctionDecl * CreateBuiltin(IdentifierInfo *II, QualType Type, unsigned ID, SourceLocation Loc)
Definition: SemaDecl.cpp:2195
clang::ExprValueKind
ExprValueKind
The categorization of expression values, currently following the C++11 scheme.
Definition: Specifiers.h:117
clang::Sema::LK_Boxed
@ LK_Boxed
Definition: Sema.h:3967
clang::ModuleLoader
Abstract interface for a module loader.
Definition: ModuleLoader.h:77
clang::UnaryTransformType::UTTKind
UTTKind
Definition: Type.h:4569
clang::Sema::ActOnOpenMPMergeableClause
OMPClause * ActOnOpenMPMergeableClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'mergeable' clause.
Definition: SemaOpenMP.cpp:16559
clang::Sema::DeviceDiagnosticReason::OmpAll
@ OmpAll
clang::Sema::BuildSourceLocExpr
ExprResult BuildSourceLocExpr(SourceLocExpr::IdentKind Kind, SourceLocation BuiltinLoc, SourceLocation RPLoc, DeclContext *ParentContext)
Definition: SemaExpr.cpp:16406
clang::Sema::BuildDecltypeType
QualType BuildDecltypeType(Expr *E, bool AsUnevaluated=true)
If AsUnevaluated is false, E is treated as though it were an evaluated context, such as when building...
Definition: SemaType.cpp:9157
clang::Sema::ActOnOpenMPMaskedDirective
StmtResult ActOnOpenMPMaskedDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp masked' after parsing of the.
Definition: SemaOpenMP.cpp:10466
clang::Sema::getExprRange
SourceRange getExprRange(Expr *E) const
Definition: SemaExpr.cpp:534
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:84
clang::Sema::DefaultVariadicArgumentPromotion
ExprResult DefaultVariadicArgumentPromotion(Expr *E, VariadicCallType CT, FunctionDecl *FDecl)
DefaultVariadicArgumentPromotion - Like DefaultArgumentPromotion, but will create a trap if the resul...
Definition: SemaExpr.cpp:1056
clang::Sema::BuildBitIntType
QualType BuildBitIntType(bool IsUnsigned, Expr *BitWidth, SourceLocation Loc)
Build a bit-precise integer type.
Definition: SemaType.cpp:2275
clang::Sema::CodeCompleteObjCInterfaceDecl
void CodeCompleteObjCInterfaceDecl(Scope *S)
Definition: SemaCodeComplete.cpp:8346
clang::Sema::BuildLoopUnrollHintAttr
LoopUnrollHintAttr * BuildLoopUnrollHintAttr(const AttributeCommonInfo &A, Expr *E)
Definition: SemaStmtAttr.cpp:874
clang::Sema::addImplicitTypedef
void addImplicitTypedef(StringRef Name, QualType T)
Definition: Sema.cpp:272
clang::Sema::NC_UndeclaredTemplate
@ NC_UndeclaredTemplate
The name was classified as an ADL-only function template name.
Definition: Sema.h:2757
clang::Sema::areMultiversionVariantFunctionsCompatible
bool areMultiversionVariantFunctionsCompatible(const FunctionDecl *OldFD, const FunctionDecl *NewFD, const PartialDiagnostic &NoProtoDiagID, const PartialDiagnosticAt &NoteCausedDiagIDAt, const PartialDiagnosticAt &NoSupportDiagIDAt, const PartialDiagnosticAt &DiffDiagIDAt, bool TemplatesSupported, bool ConstexprSupported, bool CLinkageMayDiffer)
Checks if the variant/multiversion functions are compatible.
Definition: SemaDecl.cpp:10477
clang::Sema::NTCUC_FunctionReturn
@ NTCUC_FunctionReturn
Definition: Sema.h:3092
clang::Sema::OMPIteratorData::DeclIdent
IdentifierInfo * DeclIdent
Definition: Sema.h:5719
clang::Sema::getTemplateNameKindForDiagnostics
TemplateNameKindForDiagnostics getTemplateNameKindForDiagnostics(TemplateName Name)
Definition: SemaDecl.cpp:1286
clang::Sema::DiagnoseUnusedLambdaCapture
bool DiagnoseUnusedLambdaCapture(SourceRange CaptureRange, const sema::Capture &From)
Diagnose if an explicit lambda capture is unused.
Definition: SemaLambda.cpp:1680
clang::Sema::getModuleLoader
ModuleLoader & getModuleLoader() const
Retrieve the module loader associated with the preprocessor.
Definition: Sema.cpp:58
clang::Sema::CreateOverloadedBinOp
ExprResult CreateOverloadedBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, const UnresolvedSetImpl &Fns, Expr *LHS, Expr *RHS, bool RequiresADL=true, bool AllowRewrittenCandidates=true, FunctionDecl *DefaultedFn=nullptr)
Create a binary operation that may resolve to an overloaded operator.
Definition: SemaOverload.cpp:13596
clang::Sema::isModuleVisible
bool isModuleVisible(const Module *M, bool ModulePrivate=false)
Definition: SemaLookup.cpp:1809
clang::Sema::PrintContextStack
void PrintContextStack()
Definition: Sema.h:9483
clang::Sema::ActOnStartOfTranslationUnit
void ActOnStartOfTranslationUnit()
This is called before the very first declaration in the translation unit is parsed.
Definition: Sema.cpp:1060
clang::Sema::CheckAssignmentConstraints
AssignConvertType CheckAssignmentConstraints(SourceLocation Loc, QualType LHSType, QualType RHSType)
CheckAssignmentConstraints - Perform type checking for assignment, argument passing,...
Definition: SemaExpr.cpp:9434
clang::Sema::getFunctionLevelDeclContext
DeclContext * getFunctionLevelDeclContext(bool AllowLambda=false)
If AllowLambda is true, treat lambda as function.
Definition: Sema.cpp:1473
clang::Sema::mightBeIntendedToBeTemplateName
bool mightBeIntendedToBeTemplateName(ExprResult E, bool &Dependent)
Determine whether it's plausible that E was intended to be a template-name.
Definition: Sema.h:2937
clang::Sema::ImplicitMSInheritanceAttrLoc
SourceLocation ImplicitMSInheritanceAttrLoc
Source location for newly created implicit MSInheritanceAttrs.
Definition: Sema.h:619
clang::Sema::ActOnObjCAtTryStmt
StmtResult ActOnObjCAtTryStmt(SourceLocation AtLoc, Stmt *Try, MultiStmtArg Catch, Stmt *Finally)
Definition: SemaStmt.cpp:4214
clang::TypedefDecl
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Definition: Decl.h:3286
clang::EnterExpressionEvaluationContext::EnterExpressionEvaluationContext
EnterExpressionEvaluationContext(Sema &Actions, Sema::ExpressionEvaluationContext NewContext, Decl *LambdaContextDecl=nullptr, Sema::ExpressionEvaluationContextRecord::ExpressionKind ExprContext=Sema::ExpressionEvaluationContextRecord::EK_Other, bool ShouldEnter=true)
Definition: Sema.h:13797
clang::Sema::AddTemplateConversionCandidate
void AddTemplateConversionCandidate(FunctionTemplateDecl *FunctionTemplate, DeclAccessPair FoundDecl, CXXRecordDecl *ActingContext, Expr *From, QualType ToType, OverloadCandidateSet &CandidateSet, bool AllowObjCConversionOnExplicit, bool AllowExplicit, bool AllowResultConversion=true)
Adds a conversion function template specialization candidate to the overload set, using template argu...
Definition: SemaOverload.cpp:7527
clang::Sema::ReferencedSelectors
llvm::MapVector< Selector, SourceLocation > ReferencedSelectors
Method selectors used in a @selector expression.
Definition: Sema.h:1661
clang::Sema::ActOnOpenMPAlignClause
OMPClause * ActOnOpenMPAlignClause(Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'align' clause.
Definition: SemaOpenMP.cpp:16159
clang::Sema::CheckConstraintSatisfaction
bool CheckConstraintSatisfaction(const NamedDecl *Template, ArrayRef< const Expr * > ConstraintExprs, ArrayRef< TemplateArgument > TemplateArgs, SourceRange TemplateIDRange, ConstraintSatisfaction &Satisfaction)
Check whether the given list of constraint expressions are satisfied (as if in a 'conjunction') given...
Definition: SemaConcept.cpp:312
clang::Sema::NC_Concept
@ NC_Concept
The name was classified as a concept name.
Definition: Sema.h:2759
clang::OpaquePtr< QualType >::make
static OpaquePtr make(QualType P)
Definition: Ownership.h:60
clang::Sema::CheckMain
void CheckMain(FunctionDecl *FD, const DeclSpec &D)
Definition: SemaDecl.cpp:11352
clang::Sema::isThisOutsideMemberFunctionBody
bool isThisOutsideMemberFunctionBody(QualType BaseType)
Determine whether the given type is the type of *this that is used outside of the body of a member fu...
Definition: SemaExprCXX.cpp:1402
clang::Sema::checkUnknownAnyArg
ExprResult checkUnknownAnyArg(SourceLocation callLoc, Expr *result, QualType &paramType)
Type-check an expression that's being passed to an __unknown_anytype parameter.
Definition: SemaExpr.cpp:20122
clang::Sema::lookupStdExperimentalNamespace
NamespaceDecl * lookupStdExperimentalNamespace()
Definition: SemaDeclCXX.cpp:11292
clang::Sema::InstantiateEnum
bool InstantiateEnum(SourceLocation PointOfInstantiation, EnumDecl *Instantiation, EnumDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
Instantiate the definition of an enum from a given pattern.
Definition: SemaTemplateInstantiate.cpp:2968
clang::Sema::isNonTypeNestedNameSpecifier
bool isNonTypeNestedNameSpecifier(Scope *S, CXXScopeSpec &SS, NestedNameSpecInfo &IdInfo)
Definition: SemaCXXScopeSpec.cpp:397
Priority
int Priority
Definition: Format.cpp:2554
clang::Sema::ActOnOpenMPAlignedClause
OMPClause * ActOnOpenMPAlignedClause(ArrayRef< Expr * > VarList, Expr *Alignment, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc)
Called on well-formed 'aligned' clause.
Definition: SemaOpenMP.cpp:19291
clang::Sema::mergeUuidAttr
UuidAttr * mergeUuidAttr(Decl *D, const AttributeCommonInfo &CI, StringRef UuidAsWritten, MSGuidDecl *GuidDecl)
clang::Sema::MergeSYCLAddIRAttributesFunctionAttr
SYCLAddIRAttributesFunctionAttr * MergeSYCLAddIRAttributesFunctionAttr(Decl *D, const SYCLAddIRAttributesFunctionAttr &A)
clang::Sema::SpecialMemberOverloadResultEntry::SpecialMemberOverloadResultEntry
SpecialMemberOverloadResultEntry(const llvm::FoldingSetNodeID &ID)
Definition: Sema.h:1573
clang::Sema::CheckConstexprKind::CheckValid
@ CheckValid
Identify whether this function satisfies the formal rules for constexpr functions in the current lanu...
clang::Sema::AddSYCLIntelMaxGlobalWorkDimAttr
void AddSYCLIntelMaxGlobalWorkDimAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::NSDictionaryDecl
ObjCInterfaceDecl * NSDictionaryDecl
The declaration of the Objective-C NSDictionary class.
Definition: Sema.h:1361
clang::Sema::DiagnoseUnterminatedPragmaAlignPack
void DiagnoseUnterminatedPragmaAlignPack()
Definition: SemaAttr.cpp:426
clang::Sema::ACR_error
@ ACR_error
Definition: Sema.h:12467
clang::Sema::AA_Converting
@ AA_Converting
Definition: Sema.h:3750
clang::Sema::CheckEquivalentExceptionSpec
bool CheckEquivalentExceptionSpec(FunctionDecl *Old, FunctionDecl *New)
Definition: SemaExceptionSpec.cpp:291
clang::Sema::addLambdaParameters
void addLambdaParameters(ArrayRef< LambdaIntroducer::LambdaCapture > Captures, CXXMethodDecl *CallOperator, Scope *CurScope)
Introduce the lambda parameters into scope.
Definition: SemaLambda.cpp:541
clang::Sema::CheckRebuiltAttributedStmtAttributes
bool CheckRebuiltAttributedStmtAttributes(ArrayRef< const Attr * > Attrs)
Definition: SemaStmtAttr.cpp:990
clang::PartialDiagnostic::getDiagID
unsigned getDiagID() const
Definition: PartialDiagnostic.h:141
clang::Sema::MarkDeclRefReferenced
void MarkDeclRefReferenced(DeclRefExpr *E, const Expr *Base=nullptr)
Perform reference-marking and odr-use handling for a DeclRefExpr.
Definition: SemaExpr.cpp:19230
clang::Sema::BuildSYCLBuiltinNumBasesExpr
ExprResult BuildSYCLBuiltinNumBasesExpr(SourceLocation Loc, QualType SourceTy)
Definition: SemaSYCL.cpp:257
clang::Sema::actOnObjCTypeParamList
ObjCTypeParamList * actOnObjCTypeParamList(Scope *S, SourceLocation lAngleLoc, ArrayRef< Decl * > typeParams, SourceLocation rAngleLoc)
Definition: SemaDeclObjC.cpp:770
clang::Sema::CheckTemplateTemplateArgument
bool CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, TemplateParameterList *Params, TemplateArgumentLoc &Arg)
Check a template argument against its corresponding template template parameter.
Definition: SemaTemplate.cpp:7384
clang::Sema::BuildTypeConstraint
bool BuildTypeConstraint(const CXXScopeSpec &SS, TemplateIdAnnotation *TypeConstraint, TemplateTypeParmDecl *ConstrainedParameter, SourceLocation EllipsisLoc, bool AllowUnexpandedPack)
Definition: SemaTemplate.cpp:1111
clang::Sema::NamedReturnInfo::None
@ None
Definition: Sema.h:5154
clang::Sema::ActOnOMPIteratorExpr
ExprResult ActOnOMPIteratorExpr(Scope *S, SourceLocation IteratorKwLoc, SourceLocation LLoc, SourceLocation RLoc, ArrayRef< OMPIteratorData > Data)
Definition: SemaExpr.cpp:5385
clang::Sema::NameClassification::Expr
ExprResult Expr
Definition: Sema.h:2765
clang::Sema::ActOnFinishedFunctionDefinitionInOpenMPAssumeScope
void ActOnFinishedFunctionDefinitionInOpenMPAssumeScope(Decl *D)
Act on D, a function definition inside of an omp [begin/end] assumes.
Definition: SemaOpenMP.cpp:6782
clang::Sema::getTemplateDepth
unsigned getTemplateDepth(Scope *S) const
Determine the number of levels of enclosing template parameters.
Definition: SemaTemplate.cpp:50
clang::Sema::anchor
virtual void anchor()
This virtual key function only exists to limit the emission of debug info describing the Sema class.
Definition: Sema.cpp:270
clang::Sema::BuildDeclaratorGroup
DeclGroupPtrTy BuildDeclaratorGroup(MutableArrayRef< Decl * > Group)
BuildDeclaratorGroup - convert a list of declarations into a declaration group, performing any necess...
Definition: SemaDecl.cpp:13836
clang::Sema::getDestructorTypeForDecltype
ParsedType getDestructorTypeForDecltype(const DeclSpec &DS, ParsedType ObjectType)
Definition: SemaExprCXX.cpp:459
clang::PartialDiagnostic
Definition: PartialDiagnostic.h:31
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:58
clang::Sema::tryCaptureOpenMPLambdas
void tryCaptureOpenMPLambdas(ValueDecl *V)
Function tries to capture lambda's captured variables in the OpenMP region before the original lambda...
Definition: SemaOpenMP.cpp:4474
clang::Sema::ActOnCXXNamedCast
ExprResult ActOnCXXNamedCast(SourceLocation OpLoc, tok::TokenKind Kind, SourceLocation LAngleBracketLoc, Declarator &D, SourceLocation RAngleBracketLoc, SourceLocation LParenLoc, Expr *E, SourceLocation RParenLoc)
ActOnCXXNamedCast - Parse {dynamic,static,reinterpret,const,addrspace}_cast's.
Definition: SemaCast.cpp:274
clang::Sema::InstantiatingTemplate
A stack object to be created when performing template instantiation.
Definition: Sema.h:9310
clang::Sema::ModuleDeclKind::PartitionImplementation
@ PartitionImplementation
'module X:Y;'
clang::Sema::BuildPossibleImplicitMemberExpr
ExprResult BuildPossibleImplicitMemberExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, const TemplateArgumentListInfo *TemplateArgs, const Scope *S, UnresolvedLookupExpr *AsULE=nullptr)
Builds an expression which might be an implicit member expression.
Definition: SemaExprMember.cpp:235
clang::Sema::InvalidOperands
QualType InvalidOperands(SourceLocation Loc, ExprResult &LHS, ExprResult &RHS)
the following "Check" methods will return a valid/converted QualType or a null QualType (indicating a...
Definition: SemaExpr.cpp:10046
clang::Sema::isValidVarArgType
VarArgKind isValidVarArgType(const QualType &Ty)
Determine the degree of POD-ness for an expression.
Definition: SemaExpr.cpp:959
clang::Sema::PragmaStack::CurrentValue
ValueType CurrentValue
Definition: Sema.h:843
clang::Sema::SemaDiagnosticBuilder::SemaDiagnosticBuilder
SemaDiagnosticBuilder(Kind K, SourceLocation Loc, unsigned DiagID, FunctionDecl *Fn, Sema &S, DeviceDiagnosticReason R)
Definition: Sema.cpp:1895
clang::Sema::CreateUnaryExprOrTypeTraitExpr
ExprResult CreateUnaryExprOrTypeTraitExpr(TypeSourceInfo *TInfo, SourceLocation OpLoc, UnaryExprOrTypeTrait ExprKind, SourceRange R)
Build a sizeof or alignof expression given a type operand.
Definition: SemaExpr.cpp:4629
clang::Sema::CurrentParameterCopyTypes
llvm::SmallVector< QualType, 4 > CurrentParameterCopyTypes
Stack of types that correspond to the parameter entities that are currently being copy-initialized.
Definition: Sema.h:1713
clang::Sema::SetIvarInitializers
void SetIvarInitializers(ObjCImplementationDecl *ObjCImplementation)
SetIvarInitializers - This routine builds initialization ASTs for the Objective-C implementation whos...
Definition: SemaDeclCXX.cpp:17891
clang::Sema::DeviceDeferredDiagnostic::getDiag
PartialDiagnosticAt & getDiag()
Definition: Sema.h:12692
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang::Sema::CodeSynthesisContext::ConstraintNormalization
@ ConstraintNormalization
Definition: Sema.h:9123
clang::Sema::MaybeCreateExprWithCleanups
Expr * MaybeCreateExprWithCleanups(Expr *SubExpr)
MaybeCreateExprWithCleanups - If the current full-expression requires any cleanups,...
Definition: SemaExprCXX.cpp:7157
clang::Sema::UPPC_BitFieldWidth
@ UPPC_BitFieldWidth
The size of a bit-field.
Definition: Sema.h:8453
clang::Sema::SemaDiagnosticBuilder
A generic diagnostic builder for errors which may or may not be deferred.
Definition: Sema.h:1940
clang::Sema::DiagnoseMisalignedMembers
void DiagnoseMisalignedMembers()
Diagnoses the current set of gathered accesses.
Definition: SemaChecking.cpp:17011
clang::Sema::ActOnOpenMPFirstprivateClause
OMPClause * ActOnOpenMPFirstprivateClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'firstprivate' clause.
Definition: SemaOpenMP.cpp:17253
clang::Sema::ObjCLiteralKind
ObjCLiteralKind
Definition: Sema.h:3963
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:582
clang::Sema::propagateDLLAttrToBaseClassTemplate
void propagateDLLAttrToBaseClassTemplate(CXXRecordDecl *Class, Attr *ClassAttr, ClassTemplateSpecializationDecl *BaseTemplateSpec, SourceLocation BaseLoc)
Perform propagation of DLL attributes from a derived class to a templated base class for MS compatibi...
Definition: SemaDeclCXX.cpp:6461
clang::Sema::RecordParsingTemplateParameterDepth
void RecordParsingTemplateParameterDepth(unsigned Depth)
This is used to inform Sema what the current TemplateParameterDepth is during Parsing.
Definition: Sema.cpp:2200
clang::Sema::CheckFunctionDeclaration
bool CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, LookupResult &Previous, bool IsMemberSpecialization)
Perform semantic checking of a new function declaration.
Definition: SemaDecl.cpp:11023
clang::Sema::ActOnAtEnd
Decl * ActOnAtEnd(Scope *S, SourceRange AtEnd, ArrayRef< Decl * > allMethods=None, ArrayRef< DeclGroupPtrTy > allTUVars=None)
Definition: SemaDeclObjC.cpp:3968
clang::InitializationKind
Describes the kind of initialization being performed, along with location information for tokens rela...
Definition: Initialization.h:566
clang::Sema::BuildAsTypeExpr
ExprResult BuildAsTypeExpr(Expr *E, QualType DestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
Create a new AsTypeExpr node (bitcast) from the arguments.
Definition: SemaExpr.cpp:6896
clang::Sema::getObjCInterfaceDecl
ObjCInterfaceDecl * getObjCInterfaceDecl(IdentifierInfo *&Id, SourceLocation IdLoc, bool TypoCorrection=false)
Look for an Objective-C class in the translation unit.
Definition: SemaDecl.cpp:2121
clang::Sema::ActOnPackExpansion
ParsedTemplateArgument ActOnPackExpansion(const ParsedTemplateArgument &Arg, SourceLocation EllipsisLoc)
Invoked when parsing a template argument followed by an ellipsis, which creates a pack expansion.
Definition: SemaTemplateVariadic.cpp:551
clang::ActionResult< Expr * >
clang::Sema::BuildExceptionDeclaration
VarDecl * BuildExceptionDeclaration(Scope *S, TypeSourceInfo *TInfo, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id)
Perform semantic analysis for the variable declaration that occurs within a C++ catch clause,...
Definition: SemaDeclCXX.cpp:16364
clang::Sema::RequiredTemplateKind::RequiredTemplateKind
RequiredTemplateKind(TemplateNameIsRequiredTag)
Template name is unconditionally required.
Definition: Sema.h:7859
clang::Sema::getMessageSendResultType
QualType getMessageSendResultType(const Expr *Receiver, QualType ReceiverType, ObjCMethodDecl *Method, bool isClassMessage, bool isSuperMessage)
Determine the result of a message send expression based on the type of the receiver,...
Definition: SemaExprObjC.cpp:1519
clang::Sema::CodeSynthesisContext::DeclaringImplicitEqualityComparison
@ DeclaringImplicitEqualityComparison
We are declaring an implicit 'operator==' for a defaulted 'operator<=>'.
Definition: Sema.h:9107
clang::Sema::GetOrCreateMSAsmLabel
LabelDecl * GetOrCreateMSAsmLabel(StringRef ExternalLabelName, SourceLocation Location, bool AlwaysCreate)
Definition: SemaStmtAsm.cpp:951
clang::FunctionProtoType::ExceptionSpecInfo::Type
ExceptionSpecificationType Type
The kind of exception specification this is.
Definition: Type.h:3959
clang::Sema::checkSYCLDeviceVarDecl
void checkSYCLDeviceVarDecl(VarDecl *Var)
Definition: SemaSYCL.cpp:492
clang::Sema::Cleanup
CleanupInfo Cleanup
Used to control the generation of ExprWithCleanups.
Definition: Sema.h:942
clang::Sema::ActOnOpenMPTargetParallelDirective
StmtResult ActOnOpenMPTargetParallelDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target parallel' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12580
clang::Sema::getPreprocessor
Preprocessor & getPreprocessor() const
Definition: Sema.h:1780
clang::Sema::DeferDiagsRAII::~DeferDiagsRAII
~DeferDiagsRAII()
Definition: Sema.h:2076
clang::Sema::POAK_Power
@ POAK_Power
Definition: Sema.h:10355
clang::ASTReader
Reads an AST files chain containing the contents of a translation unit.
Definition: ASTReader.h:340
clang::Sema::CreateCapturedStmtRecordDecl
RecordDecl * CreateCapturedStmtRecordDecl(CapturedDecl *&CD, SourceLocation Loc, unsigned NumParams)
Definition: SemaStmt.cpp:4647
clang::Sema::DelayedDiagnostics::getCurrentPool
sema::DelayedDiagnosticPool * getCurrentPool() const
Returns the current delayed-diagnostics pool.
Definition: Sema.h:1119
clang::Sema::ReuseLambdaContextDecl
@ ReuseLambdaContextDecl
Definition: Sema.h:5356
clang::Sema::CodeSynthesisContext::NumTemplateArgs
unsigned NumTemplateArgs
The number of template arguments in TemplateArgs.
Definition: Sema.h:9167
clang::Sema::ReferenceConversionsScope::ReferenceConversions
ReferenceConversions
The conversions that would be performed on an lvalue of type T2 when binding a reference of type T1 t...
Definition: Sema.h:12406
clang::Sema::MarkFunctionParmPackReferenced
void MarkFunctionParmPackReferenced(FunctionParmPackExpr *E)
Perform reference-marking and odr-use handling for a FunctionParmPackExpr.
Definition: SemaExpr.cpp:19269
clang::Sema::getEmissionStatus
FunctionEmissionStatus getEmissionStatus(FunctionDecl *Decl, bool Final=false)
Definition: SemaDecl.cpp:18835
clang::Sema::CallingConventionIgnoredReason
CallingConventionIgnoredReason
Describes the reason a calling convention specification was ignored, used for diagnostics.
Definition: Sema.h:13625
clang::Sema::DeviceDiagnosticReason::OmpDevice
@ OmpDevice
OpenMP specific diagnostic.
clang::Sema::ActOnConstantExpression
ExprResult ActOnConstantExpression(ExprResult Res)
Definition: SemaExpr.cpp:18971
clang::CXXThisExpr
Represents the this expression in C++.
Definition: ExprCXX.h:1142
clang::Sema::ExpressionEvaluationContext::ConstantEvaluated
@ ConstantEvaluated
The current context is "potentially evaluated" in C++11 terms, but the expression is evaluated at com...
clang::Sema::AllowedExplicit::All
@ All
Allow both explicit conversion functions and explicit constructors.
ComparisonCategories.h
clang::Sema::CodeCompleteAvailabilityPlatformName
void CodeCompleteAvailabilityPlatformName()
Definition: SemaCodeComplete.cpp:9997
clang::Sema::UPPC_StaticAssertExpression
@ UPPC_StaticAssertExpression
The expression in a static assertion.
Definition: Sema.h:8456
clang::Sema::collectUnexpandedParameterPacks
void collectUnexpandedParameterPacks(TemplateArgument Arg, SmallVectorImpl< UnexpandedParameterPack > &Unexpanded)
Collect the set of unexpanded parameter packs within the given template argument.
Definition: SemaTemplateVariadic.cpp:513
clang::Sema::ActOnTemplateTemplateParameter
NamedDecl * ActOnTemplateTemplateParameter(Scope *S, SourceLocation TmpLoc, TemplateParameterList *Params, SourceLocation EllipsisLoc, IdentifierInfo *ParamName, SourceLocation ParamNameLoc, unsigned Depth, unsigned Position, SourceLocation EqualLoc, ParsedTemplateArgument DefaultArg)
ActOnTemplateTemplateParameter - Called when a C++ template template parameter (e....
Definition: SemaTemplate.cpp:1606
clang::Sema::CollectMultipleMethodsInGlobalPool
bool CollectMultipleMethodsInGlobalPool(Selector Sel, SmallVectorImpl< ObjCMethodDecl * > &Methods, bool InstanceFirst, bool CheckTheOther, const ObjCObjectType *TypeBound=nullptr)
We first select the type of the method: Instance or Factory, then collect all methods with that type.
Definition: SemaDeclObjC.cpp:3499
clang::Sema::getMostSpecialized
UnresolvedSetIterator getMostSpecialized(UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd, TemplateSpecCandidateSet &FailedCandidates, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain=true, QualType TargetType=QualType())
Retrieve the most specialized of the given function template specializations.
Definition: SemaTemplateDeduction.cpp:5229
clang::Sema::CheckConstexprFunctionDefinition
bool CheckConstexprFunctionDefinition(const FunctionDecl *FD, CheckConstexprKind Kind)
Definition: SemaDeclCXX.cpp:1735
clang::Sema::getDestructorName
ParsedType getDestructorName(SourceLocation TildeLoc, IdentifierInfo &II, SourceLocation NameLoc, Scope *S, CXXScopeSpec &SS, ParsedType ObjectType, bool EnteringContext)
Definition: SemaExprCXX.cpp:133
clang::Sema::ModuleImportState::ImportAllowed
@ ImportAllowed
after 'module X;' but before any non-import decl.
clang::Sema::PCC_Statement
@ PCC_Statement
Code completion occurs within a statement, which may also be an expression or a declaration.
Definition: Sema.h:12979
clang::Sema::ActOnConvertVectorExpr
ExprResult ActOnConvertVectorExpr(Expr *E, ParsedType ParsedDestTy, SourceLocation BuiltinLoc, SourceLocation RParenLoc)
__builtin_convertvector(...)
Definition: SemaExpr.cpp:6915
IsStatic
bool IsStatic
Definition: Format.cpp:2562
clang::Sema::targetDiag
SemaDiagnosticBuilder targetDiag(SourceLocation Loc, unsigned DiagID, FunctionDecl *FD=nullptr)
Definition: Sema.cpp:1944
clang::TranslationUnitKind
TranslationUnitKind
Describes the kind of translation unit being processed.
Definition: LangOptions.h:757
clang::Sema::OverloadKind
OverloadKind
C++ Overloading.
Definition: Sema.h:3758
clang::attr::ParsedSubjectMatchRuleSet
llvm::DenseMap< int, SourceRange > ParsedSubjectMatchRuleSet
Definition: AttrSubjectMatchRules.h:29
clang::Sema::CodeSynthesisContext::ExceptionSpecEvaluation
@ ExceptionSpecEvaluation
We are computing the exception specification for a defaulted special member function.
Definition: Sema.h:9089
clang::Sema::CodeCompleteObjCSuperMessage
void CodeCompleteObjCSuperMessage(Scope *S, SourceLocation SuperLoc, ArrayRef< IdentifierInfo * > SelIdents, bool AtArgumentExpression)
Definition: SemaCodeComplete.cpp:7828
clang::Sema::ICEConvertDiagnoser::diagnoseNoMatch
SemaDiagnosticBuilder diagnoseNoMatch(Sema &S, SourceLocation Loc, QualType T) override
Emits a diagnostic complaining that the expression does not have integral or enumeration type.
Definition: Sema.h:3939
clang::sema::LambdaScopeInfo
Definition: ScopeInfo.h:825
clang::Sema::PragmaSectionKind
PragmaSectionKind
Definition: Sema.h:10402
clang::ObjCMethodDecl
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:139
clang::Sema::ObjCClassMessage
@ ObjCClassMessage
The message is a class message, and the identifier is a type name.
Definition: Sema.h:10225
clang::Sema::ExtVectorDecls
ExtVectorDeclsType ExtVectorDecls
ExtVectorDecls - This is a list all the extended vector types.
Definition: Sema.h:996
clang::Sema::isImmediateFunctionContext
bool isImmediateFunctionContext() const
Definition: Sema.h:9514
DeclarationName.h
clang::IfStatementKind
IfStatementKind
In an if statement, this denotes whether the the statement is a constexpr or consteval if statement.
Definition: Specifiers.h:36
clang::Sema::ActOnPragmaClangSection
void ActOnPragmaClangSection(SourceLocation PragmaLoc, PragmaClangSectionAction Action, PragmaClangSectionKind SecKind, StringRef SecName)
ActOnPragmaClangSection - Called on well formed #pragma clang section.
Definition: SemaAttr.cpp:272
clang::TypoExpr
TypoExpr - Internal placeholder for expressions where typo correction still needs to be performed and...
Definition: Expr.h:6420
clang::Sema::OMPIteratorData::Type
ParsedType Type
Definition: Sema.h:5721
clang::Sema::IdentifierSourceLocations
llvm::DenseMap< IdentifierInfo *, SrcLocSet > IdentifierSourceLocations
Definition: Sema.h:9591
clang::Decl::isUnconditionallyVisible
bool isUnconditionallyVisible() const
Determine whether this declaration is definitely visible to name lookup, independent of whether the o...
Definition: DeclBase.h:797
clang::Sema::CheckParmsForFunctionDef
bool CheckParmsForFunctionDef(ArrayRef< ParmVarDecl * > Parameters, bool CheckParameterNames)
Helpers for dealing with blocks and functions.
Definition: SemaChecking.cpp:15145
clang::Sema::MaybeODRUseExprSet
llvm::SetVector< Expr *, SmallVector< Expr *, 4 >, llvm::SmallPtrSet< Expr *, 4 > > MaybeODRUseExprSet
Store a set of either DeclRefExprs or MemberExprs that contain a reference to a variable (constant) t...
Definition: Sema.h:954
clang::DiagnosticBuilder::isActive
bool isActive() const
Determine whether this diagnostic is still active.
Definition: Diagnostic.h:1309
clang::Sema::AP_InferredFromOtherPlatform
@ AP_InferredFromOtherPlatform
The availability attribute for a specific platform was inferred from an availability attribute for an...
Definition: Sema.h:3675
clang::Sema::CheckStaticLocalForDllExport
void CheckStaticLocalForDllExport(VarDecl *VD)
Check if VD needs to be dllexport/dllimport due to being in a dllexport/import function.
Definition: SemaDecl.cpp:13554
clang::LateParsedTemplate::D
Decl * D
The template function declaration to be late parsed.
Definition: Sema.h:13849
clang::Sema::ActOnModuleEnd
void ActOnModuleEnd(SourceLocation DirectiveLoc, Module *Mod)
The parser has left a submodule.
Definition: SemaModule.cpp:618
clang::NullabilityKind
NullabilityKind
Describes the nullability of a particular type.
Definition: Specifiers.h:315
clang::Sema::LookupInObjCMethod
ExprResult LookupInObjCMethod(LookupResult &LookUp, Scope *S, IdentifierInfo *II, bool AllowBuiltinCreation=false)
The parser has read a name in, and Sema has detected that we're currently inside an ObjC method.
Definition: SemaExpr.cpp:2970
clang::Sema::ExpressionEvaluationContextRecord::InDiscardedStatement
bool InDiscardedStatement
Definition: Sema.h:1488
clang::Sema::GetFormatStringType
static FormatStringType GetFormatStringType(const FormatAttr *Format)
Definition: SemaChecking.cpp:8550
clang::Sema::ActOnStartOfSwitchStmt
StmtResult ActOnStartOfSwitchStmt(SourceLocation SwitchLoc, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc)
Definition: SemaStmt.cpp:1082
clang::Sema::ActOnOpenMPTeamsGenericLoopDirective
StmtResult ActOnOpenMPTeamsGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10229
clang::Sema::emitAndClearUnusedLocalTypedefWarnings
void emitAndClearUnusedLocalTypedefWarnings()
Definition: Sema.cpp:1044
clang::Sema::ActOnOpenMPCanonicalLoop
StmtResult ActOnOpenMPCanonicalLoop(Stmt *AStmt)
Called for syntactical loops (ForStmt or CXXForRangeStmt) associated to an OpenMP loop directive.
Definition: SemaOpenMP.cpp:5535
clang::Sema::DefaultedFunctionKind::DefaultedFunctionKind
DefaultedFunctionKind(CXXSpecialMember CSM)
Definition: Sema.h:3458
clang::Sema::finalizeOpenMPDelayedAnalysis
void finalizeOpenMPDelayedAnalysis(const FunctionDecl *Caller, const FunctionDecl *Callee, SourceLocation Loc)
Finishes analysis of the deferred functions calls that may be declared as host/nohost during device/h...
Definition: SemaOpenMP.cpp:2495
clang::Sema::ActOnOpenMPTargetExitDataDirective
StmtResult ActOnOpenMPTargetExitDataDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target exit data' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12766
clang::concepts::ExprRequirement::ReturnTypeRequirement
Definition: ExprConcepts.h:268
clang::Sema::CheckEnumRedeclaration
bool CheckEnumRedeclaration(SourceLocation EnumLoc, bool IsScoped, QualType EnumUnderlyingTy, bool IsFixed, const EnumDecl *Prev)
Check whether this is a valid redeclaration of a previous enumeration.
Definition: SemaDecl.cpp:15559
clang::Sema::ActOnOpenMPBindClause
OMPClause * ActOnOpenMPBindClause(OpenMPBindClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on a well-formed 'bind' clause.
Definition: SemaOpenMP.cpp:22795
clang::Sema::ActOnSEHTryBlock
StmtResult ActOnSEHTryBlock(bool IsCXXTry, SourceLocation TryLoc, Stmt *TryBlock, Stmt *Handler)
Definition: SemaStmt.cpp:4542
clang::Sema::CodeSynthesisContext::SavedInNonInstantiationSFINAEContext
bool SavedInNonInstantiationSFINAEContext
Was the enclosing context a non-instantiation SFINAE context?
Definition: Sema.h:9146
clang::Sema::PragmaMsStackAction
PragmaMsStackAction
Definition: Sema.h:654
clang::Sema::CXXThisTypeOverride
QualType CXXThisTypeOverride
When non-NULL, the C++ 'this' expression is allowed despite the current context not being a non-stati...
Definition: Sema.h:6593
clang::StmtResult
ActionResult< Stmt * > StmtResult
Definition: Ownership.h:263
clang::Sema::AFS_Both
@ AFS_Both
Look for allocation functions in both the global scope and in the scope of the allocated class.
Definition: Sema.h:6713
clang::Sema::DeviceDeferredDiagnostic::getReason
DeviceDiagnosticReason getReason() const
Definition: Sema.h:12693
clang::Sema::CheckDestructorAccess
AccessResult CheckDestructorAccess(SourceLocation Loc, CXXDestructorDecl *Dtor, const PartialDiagnostic &PDiag, QualType objectType=QualType())
Definition: SemaAccess.cpp:1605
clang::Sema::ActOnForStmt
StmtResult ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, Stmt *First, ConditionResult Second, FullExprArg Third, SourceLocation RParenLoc, Stmt *Body)
Definition: SemaStmt.cpp:2123
clang::Sema::NC_Keyword
@ NC_Keyword
The name has been typo-corrected to a keyword.
Definition: Sema.h:2730
clang::Sema::TUK_Reference
@ TUK_Reference
Definition: Sema.h:3377
clang::Sema::FST_FreeBSDKPrintf
@ FST_FreeBSDKPrintf
Definition: Sema.h:13328
clang::Sema::PopPragmaVisibility
void PopPragmaVisibility(bool IsNamespaceEnd, SourceLocation EndLoc)
PopPragmaVisibility - Pop the top element of the visibility stack; used for '#pragma GCC visibility' ...
Definition: SemaAttr.cpp:1220
clang::Sema::getCurScope
Scope * getCurScope() const
Retrieve the parser's current scope.
Definition: Sema.h:13502
clang::Sema::WarnExactTypedMethods
void WarnExactTypedMethods(ObjCMethodDecl *Method, ObjCMethodDecl *MethodDecl, bool IsProtocolMethodDecl)
WarnExactTypedMethods - This routine issues a warning if method implementation declaration matches ex...
Definition: SemaDeclObjC.cpp:2616
clang::interp::This
bool This(InterpState &S, CodePtr OpPC)
Definition: Interp.h:829
clang::Sema::ActOnAfterCompoundStatementLeadingPragmas
void ActOnAfterCompoundStatementLeadingPragmas()
Definition: SemaStmt.cpp:393
clang::Sema::BuildMicrosoftCAnonymousStruct
Decl * BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS, RecordDecl *Record)
BuildMicrosoftCAnonymousStruct - Handle the declaration of an Microsoft C anonymous structure.
Definition: SemaDecl.cpp:5491
clang::DependentDiagnostic
A dependently-generated diagnostic.
Definition: DependentDiagnostic.h:36
clang::Sema::CheckUnusedVolatileAssignment
void CheckUnusedVolatileAssignment(Expr *E)
Check whether E, which is either a discarded-value expression or an unevaluated operand,...
Definition: SemaExpr.cpp:17101
clang::Sema::RetainOwnershipKind::NS
@ NS
clang::Sema::BuildVectorType
QualType BuildVectorType(QualType T, Expr *VecSize, SourceLocation AttrLoc)
Definition: SemaType.cpp:2604
clang::Sema::InNonInstantiationSFINAEContext
bool InNonInstantiationSFINAEContext
Whether we are in a SFINAE context that is not associated with template instantiation.
Definition: Sema.h:9234
clang::Sema::FunctionEmissionStatus::Emitted
@ Emitted
clang::Sema::ActOnSuperScopeSpecifier
bool ActOnSuperScopeSpecifier(SourceLocation SuperLoc, SourceLocation ColonColonLoc, CXXScopeSpec &SS)
The parser has parsed a '__super' nested-name-specifier.
Definition: SemaCXXScopeSpec.cpp:292
clang::Sema::UPPC_FriendDeclaration
@ UPPC_FriendDeclaration
A friend declaration.
Definition: Sema.h:8468
clang::Sema::mergeImportNameAttr
WebAssemblyImportNameAttr * mergeImportNameAttr(Decl *D, const WebAssemblyImportNameAttr &AL)
clang::SYCLIntegrationFooter::SYCLIntegrationFooter
SYCLIntegrationFooter(Sema &S)
Definition: Sema.h:457
clang::Expr::NullPointerConstantKind
NullPointerConstantKind
Enumeration used to describe the kind of Null pointer constant returned from isNullPointerConstant().
Definition: Expr.h:757
clang::Sema::ActOnOpenMPSimdDirective
StmtResult ActOnOpenMPSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:9944
clang::Sema::DiagnoseUnknownTemplateName
bool DiagnoseUnknownTemplateName(const IdentifierInfo &II, SourceLocation IILoc, Scope *S, const CXXScopeSpec *SS, TemplateTy &SuggestedTemplate, TemplateNameKind &SuggestedKind)
Definition: SemaTemplate.cpp:345
clang::Sema::DefineImplicitLambdaToBlockPointerConversion
void DefineImplicitLambdaToBlockPointerConversion(SourceLocation CurrentLoc, CXXConversionDecl *Conv)
Define the "body" of the conversion from a lambda object to a block pointer.
Definition: SemaDeclCXX.cpp:15373
clang::FileNullability::PointerEndLoc
SourceLocation PointerEndLoc
The end location for the first pointer declarator in the file.
Definition: Sema.h:253
clang::Sema::AddSYCLIntelNoGlobalWorkOffsetAttr
void AddSYCLIntelNoGlobalWorkOffsetAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::SpecialMemberOverloadResultEntry
Definition: Sema.h:1569
clang::Sema::CheckSingleAssignmentConstraints
AssignConvertType CheckSingleAssignmentConstraints(QualType LHSType, ExprResult &RHS, bool Diagnose=true, bool DiagnoseCFAudited=false, bool ConvertRHS=true)
Check assignment constraints for an assignment of RHS to LHSType.
Definition: SemaExpr.cpp:9874
clang::Sema::CodeSynthesisContext::InitializingStructuredBinding
@ InitializingStructuredBinding
We are initializing a structured binding.
Definition: Sema.h:9133
clang::Sema::CheckCallingConvAttr
bool CheckCallingConvAttr(const ParsedAttr &attr, CallingConv &CC, const FunctionDecl *FD=nullptr)
clang::Sema::LookupNecessaryTypesForBuiltin
void LookupNecessaryTypesForBuiltin(Scope *S, unsigned ID)
Definition: SemaLookup.cpp:1016
clang::Sema::ConstSegStack
PragmaStack< StringLiteral * > ConstSegStack
Definition: Sema.h:869
clang::Sema::isDeclInScope
bool isDeclInScope(NamedDecl *D, DeclContext *Ctx, Scope *S=nullptr, bool AllowInlineNamespace=false)
isDeclInScope - If 'Ctx' is a function/method, isDeclInScope returns true if 'D' is in Scope 'S',...
Definition: SemaDecl.cpp:1556
clang::Sema::AA_Casting
@ AA_Casting
Definition: Sema.h:3753
clang::Builtin::ID
ID
Definition: Builtins.h:49
clang::Sema::CheckParameter
ParmVarDecl * CheckParameter(DeclContext *DC, SourceLocation StartLoc, SourceLocation NameLoc, IdentifierInfo *Name, QualType T, TypeSourceInfo *TSInfo, StorageClass SC)
Definition: SemaDecl.cpp:14113
clang::Sema::UnparsedDefaultArgLocs
llvm::DenseMap< ParmVarDecl *, SourceLocation > UnparsedDefaultArgLocs
Definition: Sema.h:1614
clang::FunctionProtoType::ExtProtoInfo
Extra information about a function prototype.
Definition: Type.h:3983
clang::CXXBasePath
Represents a path from a specific derived class (which is not represented as part of the path) to a p...
Definition: CXXInheritance.h:70
clang::Sema::FormatStringHasSArg
bool FormatStringHasSArg(const StringLiteral *FExpr)
Definition: SemaChecking.cpp:10302
clang::Sema::ActOnOpenMPNumTeamsClause
OMPClause * ActOnOpenMPNumTeamsClause(Expr *NumTeams, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_teams' clause.
Definition: SemaOpenMP.cpp:21582
clang::ObjCTypeParamList
Stores a list of Objective-C type parameters for a parameterized class or a category/extension thereo...
Definition: DeclObjC.h:660
clang::Sema::CodeCompleteObjCAtExpression
void CodeCompleteObjCAtExpression(Scope *S)
Definition: SemaCodeComplete.cpp:7200
clang::Sema::FunctionDeclAndLoc
A pair of a canonical FunctionDecl and a SourceLocation.
Definition: Sema.h:12709
clang::Sema::DiagnoseEmptyLookup
bool DiagnoseEmptyLookup(Scope *S, CXXScopeSpec &SS, LookupResult &R, CorrectionCandidateCallback &CCC, TemplateArgumentListInfo *ExplicitTemplateArgs=nullptr, ArrayRef< Expr * > Args=None, TypoExpr **Out=nullptr)
Diagnose an empty lookup.
Definition: SemaExpr.cpp:2281
clang::Sema::NoteOverloadCandidate
void NoteOverloadCandidate(NamedDecl *Found, FunctionDecl *Fn, OverloadCandidateRewriteKind RewriteKind=OverloadCandidateRewriteKind(), QualType DestType=QualType(), bool TakingAddress=false)
Definition: SemaOverload.cpp:10363
clang::LangOptions::PragmaMSPointersToMembersKind
PragmaMSPointersToMembersKind
Definition: LangOptions.h:100
clang::Sema::diagnoseNullResettableSynthesizedSetters
void diagnoseNullResettableSynthesizedSetters(const ObjCImplDecl *impDecl)
Diagnose any null-resettable synthesized setters.
Definition: SemaObjCProperty.cpp:2140
clang::LangAS::sycl_private
@ sycl_private
clang::Sema::CheckCompleteVariableDeclaration
void CheckCompleteVariableDeclaration(VarDecl *VD)
Definition: SemaDecl.cpp:13253
clang::Sema::isKnownGoodSYCLDecl
bool isKnownGoodSYCLDecl(const Decl *D)
Definition: SemaSYCL.cpp:401
clang::Sema::hasGlobalOpenMPAssumes
bool hasGlobalOpenMPAssumes() const
Check if there is an active global omp assumes directive.
Definition: Sema.h:11020
clang::LangOptions::SYCLIntFooter
std::string SYCLIntFooter
SYCL integration footer to be generated by the device compiler.
Definition: LangOptions.h:425
clang::Sema::usesPartialOrExplicitSpecialization
bool usesPartialOrExplicitSpecialization(SourceLocation Loc, ClassTemplateSpecializationDecl *ClassTemplateSpec)
Definition: SemaTemplateInstantiate.cpp:3106
clang::Sema::CompoundScopeRAII::CompoundScopeRAII
CompoundScopeRAII(Sema &S, bool IsStmtExpr=false)
Definition: Sema.h:5016
clang::Sema::ActOnUnaryOp
ExprResult ActOnUnaryOp(Scope *S, SourceLocation OpLoc, tok::TokenKind Op, Expr *Input)
Definition: SemaExpr.cpp:15557
clang::Sema::LookupNestedNameSpecifierName
@ LookupNestedNameSpecifierName
Look up of a name that precedes the '::' scope resolution operator in C++.
Definition: Sema.h:4324
clang::Sema::MarkDeducedTemplateParameters
void MarkDeducedTemplateParameters(const FunctionTemplateDecl *FunctionTemplate, llvm::SmallBitVector &Deduced)
Definition: Sema.h:9028
clang::Sema::OSMK_RetainingInit
@ OSMK_RetainingInit
Definition: Sema.h:10159
clang::Sema::getOpenMPDeclareMapperVarName
const ValueDecl * getOpenMPDeclareMapperVarName() const
Definition: SemaOpenMP.cpp:21577
clang::Sema::ImplicitExceptionSpecification::getExceptionSpecType
ExceptionSpecificationType getExceptionSpecType() const
Get the computed exception specification type.
Definition: Sema.h:6260
clang::Sema::ProcessDeclAttributes
void ProcessDeclAttributes(Scope *S, Decl *D, const Declarator &PD)
clang::Sema::CheckLogicalOperands
QualType CheckLogicalOperands(ExprResult &LHS, ExprResult &RHS, SourceLocation Loc, BinaryOperatorKind Opc)
Definition: SemaExpr.cpp:13068
clang::Sema::EndOpenMPClause
void EndOpenMPClause()
End analysis of clauses.
Definition: SemaOpenMP.cpp:2546
clang::Sema::DiagnoseAbsenceOfOverrideControl
void DiagnoseAbsenceOfOverrideControl(NamedDecl *D, bool Inconsistent)
DiagnoseAbsenceOfOverrideControl - Diagnose if 'override' keyword was not used in the declaration of ...
Definition: SemaDeclCXX.cpp:3145
clang::Sema::mergeDeclAttributes
void mergeDeclAttributes(NamedDecl *New, Decl *Old, AvailabilityMergeKind AMK=AMK_Redeclaration)
mergeDeclAttributes - Copy attributes from the Old decl to the New one.
Definition: SemaDecl.cpp:3029
clang::Sema::FullExprArg::FullExprArg
FullExprArg()
Definition: Sema.h:4964
clang
Definition: CalledOnceCheck.h:17
clang::Sema::PushFunctionScope
void PushFunctionScope()
Enter a new function scope.
Definition: Sema.cpp:2177
clang::Sema::CFT_Global
@ CFT_Global
Definition: Sema.h:12802
clang::Sema::CheckConstexprKind
CheckConstexprKind
Definition: Sema.h:3039
clang::Sema::CreateRecoveryExpr
ExprResult CreateRecoveryExpr(SourceLocation Begin, SourceLocation End, ArrayRef< Expr * > SubExprs, QualType T=QualType())
Attempts to produce a RecoveryExpr after some AST node cannot be created.
Definition: SemaExpr.cpp:20387
clang::Sema::ProduceCtorInitMemberSignatureHelp
QualType ProduceCtorInitMemberSignatureHelp(Decl *ConstructorDecl, CXXScopeSpec SS, ParsedType TemplateTypeTy, ArrayRef< Expr * > ArgExprs, IdentifierInfo *II, SourceLocation OpenParLoc, bool Braced)
Definition: SemaCodeComplete.cpp:6240
clang::IndirectFieldDecl
Represents a field injected from an anonymous union/struct into the parent scope.
Definition: Decl.h:3093
clang::Sema::DictionaryWithObjectsMethod
ObjCMethodDecl * DictionaryWithObjectsMethod
The declaration of the dictionaryWithObjects:forKeys:count: method.
Definition: Sema.h:1364
clang::Sema::mergeObjCMethodDecls
void mergeObjCMethodDecls(ObjCMethodDecl *New, ObjCMethodDecl *Old)
Definition: SemaDecl.cpp:4077
clang::Sema::PerformMemberExprBaseConversion
ExprResult PerformMemberExprBaseConversion(Expr *Base, bool IsArrow)
Perform conversions on the LHS of a member access expression.
Definition: SemaExprMember.cpp:1227
clang::Sema::DiagIfReachable
bool DiagIfReachable(SourceLocation Loc, ArrayRef< const Stmt * > Stmts, const PartialDiagnostic &PD)
Conditionally issue a diagnostic based on the statements's reachability analysis.
Definition: SemaExpr.cpp:19398
clang::Sema::inferGslPointerAttribute
void inferGslPointerAttribute(NamedDecl *ND, CXXRecordDecl *UnderlyingRecord)
Add gsl::Pointer attribute to std::container::iterator.
Definition: SemaAttr.cpp:108
clang::Sema::ImplicitlyRetainedSelfLocs
llvm::SmallVector< std::pair< SourceLocation, const BlockDecl * >, 1 > ImplicitlyRetainedSelfLocs
List of SourceLocations where 'self' is implicitly retained inside a block.
Definition: Sema.h:1666
clang::Sema::PragmaClangSection::Valid
bool Valid
Definition: Sema.h:644
clang::Sema::isConstantEvaluatedOverride
bool isConstantEvaluatedOverride
Used to change context to isConstantEvaluated without pushing a heavy ExpressionEvaluationContextReco...
Definition: Sema.h:1204
clang::Sema::DeviceDiagnosticReason::OmpHost
@ OmpHost
clang::Sema::ObjCInstanceMessage
@ ObjCInstanceMessage
The message is an instance message.
Definition: Sema.h:10222
clang::Sema::CheckTypenameType
QualType CheckTypenameType(ElaboratedTypeKeyword Keyword, SourceLocation KeywordLoc, NestedNameSpecifierLoc QualifierLoc, const IdentifierInfo &II, SourceLocation IILoc, TypeSourceInfo **TSI, bool DeducedTSTContext)
Definition: SemaTemplate.cpp:10535
clang::Sema::NC_UndeclaredNonType
@ NC_UndeclaredNonType
The name was classified as an ADL-only function name.
Definition: Sema.h:2740
clang::Sema::AlignPackInfo::Mac68k
@ Mac68k
Definition: Sema.h:669
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:752
clang::Sema::ObjCArgInfo
Definition: Sema.h:10163
clang::Sema::TDK_IncompletePack
@ TDK_IncompletePack
Template argument deduction did not deduce a value for every expansion of an expanded template parame...
Definition: Sema.h:8820
clang::sema::CompoundScopeInfo
Contains information about the compound statement currently being parsed.
Definition: ScopeInfo.h:67
clang::Sema::TDK_CUDATargetMismatch
@ TDK_CUDATargetMismatch
CUDA Target attributes do not match.
Definition: Sema.h:8859
clang::Sema::checkVarDeclRedefinition
bool checkVarDeclRedefinition(VarDecl *OldDefn, VarDecl *NewDefn)
We've just determined that Old and New both appear to be definitions of the same variable.
Definition: SemaDecl.cpp:4541
clang::Sema::CompleteTypeKind::Default
@ Default
clang::Sema::CheckConvertedConstantExpression
ExprResult CheckConvertedConstantExpression(Expr *From, QualType T, llvm::APSInt &Value, CCEKind CCE)
Definition: SemaOverload.cpp:5874
clang::Sema::DeclareImplicitCopyConstructor
CXXConstructorDecl * DeclareImplicitCopyConstructor(CXXRecordDecl *ClassDecl)
Declare the implicit copy constructor for the given class.
Definition: SemaDeclCXX.cpp:15034
clang::Sema::LK_Array
@ LK_Array
Definition: Sema.h:3964
clang::Sema::POAK_Packed
@ POAK_Packed
Definition: Sema.h:10354
clang::Sema::ActOnStartOfCompoundStmt
void ActOnStartOfCompoundStmt(bool IsStmtExpr)
Definition: SemaStmt.cpp:389
clang::Sema::CheckAttrTarget
bool CheckAttrTarget(const ParsedAttr &CurrAttr)
clang::Sema::SetCtorInitializers
bool SetCtorInitializers(CXXConstructorDecl *Constructor, bool AnyErrors, ArrayRef< CXXCtorInitializer * > Initializers=None)
Definition: SemaDeclCXX.cpp:5145
clang::Sema::ExtractUnqualifiedFunctionType
QualType ExtractUnqualifiedFunctionType(QualType PossiblyAFunctionType)
Definition: SemaOverload.cpp:11932
clang::Sema::SpecialMembersBeingDeclared
llvm::SmallPtrSet< SpecialMemberDecl, 4 > SpecialMembersBeingDeclared
The C++ special members which we are currently in the process of declaring.
Definition: Sema.h:1685
clang::Sema::ActOnPragmaDump
void ActOnPragmaDump(Scope *S, SourceLocation Loc, IdentifierInfo *II)
Called on #pragma clang __debug dump II.
Definition: SemaLookup.cpp:5600
clang::transformer::range
RangeSelector range(RangeSelector Begin, RangeSelector End)
DEPRECATED. Use enclose.
Definition: RangeSelector.h:41
clang::Sema::ActOnWhileStmt
StmtResult ActOnWhileStmt(SourceLocation WhileLoc, SourceLocation LParenLoc, ConditionResult Cond, SourceLocation RParenLoc, Stmt *Body)
Definition: SemaStmt.cpp:1676
clang::Sema::ActOnEnumBody
void ActOnEnumBody(SourceLocation EnumLoc, SourceRange BraceRange, Decl *EnumDecl, ArrayRef< Decl * > Elements, Scope *S, const ParsedAttributesView &Attr)
Definition: SemaDecl.cpp:18518
clang::OpenMPDistScheduleClauseKind
OpenMPDistScheduleClauseKind
OpenMP attributes for 'dist_schedule' clause.
Definition: OpenMPKinds.h:103
clang::Sema::GlobalMethodPool
Definition: Sema.h:1634
clang::TypeResult
ActionResult< ParsedType > TypeResult
Definition: Ownership.h:264
clang::Sema::ActOnConditionVariable
ConditionResult ActOnConditionVariable(Decl *ConditionVar, SourceLocation StmtLoc, ConditionKind CK)
Definition: SemaExprCXX.cpp:3912
clang::Sema::DiagnoseTemplateParameterShadow
void DiagnoseTemplateParameterShadow(SourceLocation Loc, Decl *PrevDecl)
DiagnoseTemplateParameterShadow - Produce a diagnostic complaining that the template parameter 'PrevD...
Definition: SemaTemplate.cpp:881
clang::Sema::PSK_Pop
@ PSK_Pop
Definition: Sema.h:658
clang::Sema::OMPIteratorData::AssignLoc
SourceLocation AssignLoc
Definition: Sema.h:5723
clang::Sema::OriginalCallArg::OriginalArgType
QualType OriginalArgType
Definition: Sema.h:8891
clang::Sema::ActOnTagStartSkippedDefinition
SkippedDefinitionContext ActOnTagStartSkippedDefinition(Scope *S, Decl *TD)
Invoked when we enter a tag definition that we're skipping.
Definition: SemaDecl.cpp:1319
clang::Sema::AllocationFunctionScope
AllocationFunctionScope
The scope in which to find allocation functions.
Definition: Sema.h:6705
clang::Sema::NamedReturnInfo::MoveEligibleAndCopyElidable
@ MoveEligibleAndCopyElidable
Definition: Sema.h:5154
clang::TPOC
TPOC
The context in which partial ordering of function templates occurs.
Definition: Template.h:203
clang::Sema::VerifyICEDiagnoser
Abstract base class used for diagnosing integer constant expression violations.
Definition: Sema.h:12628
clang::Sema::checkCommonAttributeFeatures
bool checkCommonAttributeFeatures(const Decl *D, const ParsedAttr &A, bool SkipArgCountCheck=false)
Handles semantic checking for features that are common to all attributes, such as checking whether a ...
Definition: SemaAttr.cpp:1301
clang::Sema::FST_Scanf
@ FST_Scanf
Definition: Sema.h:13322
clang::Sema::hasVisibleExplicitSpecialization
bool hasVisibleExplicitSpecialization(const NamedDecl *D, llvm::SmallVectorImpl< Module * > *Modules=nullptr)
Determine if there is a visible declaration of D that is an explicit specialization declaration for a...
Definition: SemaLookup.cpp:1697
clang::Sema::ActOnDocumentableDecl
void ActOnDocumentableDecl(Decl *D)
Should be called on all declarations that might have attached documentation comments.
Definition: SemaDecl.cpp:13876
clang::Sema::ActOnOpenMPForSimdDirective
StmtResult ActOnOpenMPForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp for simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10019
clang::Sema::MergeIntelReqdSubGroupSizeAttr
IntelReqdSubGroupSizeAttr * MergeIntelReqdSubGroupSizeAttr(Decl *D, const IntelReqdSubGroupSizeAttr &A)
clang::Sema::ActOnDuplicateDefinition
bool ActOnDuplicateDefinition(DeclSpec &DS, Decl *Prev, SkipBodyInfo &SkipBody)
Perform ODR-like check for C/ObjC when merging tag types from modules.
Definition: SemaDecl.cpp:16783
clang::Sema::createLambdaInitCaptureVarDecl
VarDecl * createLambdaInitCaptureVarDecl(SourceLocation Loc, QualType InitCaptureType, SourceLocation EllipsisLoc, IdentifierInfo *Id, unsigned InitStyle, Expr *Init)
Create a dummy variable within the declcontext of the lambda's call operator, for name lookup purpose...
Definition: SemaLambda.cpp:856
clang::Sema::AddIntelFPGANumBanksAttr
void AddIntelFPGANumBanksAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::LookupOrCreateLabel
LabelDecl * LookupOrCreateLabel(IdentifierInfo *II, SourceLocation IdentLoc, SourceLocation GnuLabelLoc=SourceLocation())
LookupOrCreateLabel - Do a name lookup of a label with the specified name.
Definition: SemaLookup.cpp:4173
clang::Sema::CheckConstructorDeclarator
QualType CheckConstructorDeclarator(Declarator &D, QualType R, StorageClass &SC)
CheckConstructorDeclarator - Called by ActOnDeclarator to check the well-formedness of the constructo...
Definition: SemaDeclCXX.cpp:10453
clang::Sema::AlignPackInfo::getPackNumber
unsigned getPackNumber() const
Definition: Sema.h:722
clang::Sema::ReadMethodPool
void ReadMethodPool(Selector Sel)
Read the contents of the method pool for a given selector from external storage.
Definition: SemaDeclObjC.cpp:3409
clang::Designation
Designation - Represent a full designation, which is a sequence of designators.
Definition: Designator.h:185
clang::Stmt
Stmt - This represents one statement.
Definition: Stmt.h:69
clang::PreferredTypeBuilder::enterTypeCast
void enterTypeCast(SourceLocation Tok, QualType CastType)
Handles all type casts, including C-style cast, C++ casts, etc.
Definition: SemaCodeComplete.cpp:594
clang::EST_BasicNoexcept
@ EST_BasicNoexcept
noexcept
Definition: ExceptionSpecificationType.h:26
clang::Sema::ReferenceConversionsScope::ObjC
@ ObjC
Definition: Sema.h:12411
clang::Sema::DiagnoseDeletedDefaultedFunction
void DiagnoseDeletedDefaultedFunction(FunctionDecl *FD)
Produce notes explaining why a defaulted function was defined as deleted.
Definition: SemaDeclCXX.cpp:9473
clang::Sema::BuildIfStmt
StmtResult BuildIfStmt(SourceLocation IfLoc, IfStatementKind StatementKind, SourceLocation LParenLoc, Stmt *InitStmt, ConditionResult Cond, SourceLocation RParenLoc, Stmt *ThenVal, SourceLocation ElseLoc, Stmt *ElseVal)
Definition: SemaStmt.cpp:942
clang::Sema::ParseObjCProtocolExpression
ExprResult ParseObjCProtocolExpression(IdentifierInfo *ProtocolName, SourceLocation AtLoc, SourceLocation ProtoLoc, SourceLocation LParenLoc, SourceLocation ProtoIdLoc, SourceLocation RParenLoc)
ParseObjCProtocolExpression - Build protocol expression for @protocol.
Definition: SemaExprObjC.cpp:1386
clang::ObjCIvarDecl
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1923
clang::Sema::hasExplicitCallingConv
bool hasExplicitCallingConv(QualType T)
Definition: SemaType.cpp:7838
clang::Sema::PragmaAlignPackDiagnoseKind::NonDefaultStateAtInclude
@ NonDefaultStateAtInclude
clang::Sema::RegisterLocallyScopedExternCDecl
void RegisterLocallyScopedExternCDecl(NamedDecl *ND, Scope *S)
Register the given locally-scoped extern "C" declaration so that it can be found later for redeclarat...
Definition: SemaDecl.cpp:6316
clang::Sema::ActOnOpenMPFinalClause
OMPClause * ActOnOpenMPFinalClause(Expr *Condition, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'final' clause.
Definition: SemaOpenMP.cpp:15551
clang::Sema::getObjCMessageKind
ObjCMessageKind getObjCMessageKind(Scope *S, IdentifierInfo *Name, SourceLocation NameLoc, bool IsSuper, bool HasTrailingDot, ParsedType &ReceiverType)
Definition: SemaExprObjC.cpp:2284
clang::Sema::getScopeForContext
Scope * getScopeForContext(DeclContext *Ctx)
Determines the active Scope associated with the given declaration context.
Definition: Sema.cpp:2158
clang::Sema::Incompatible
@ Incompatible
Incompatible - We reject this conversion outright, it is invalid to represent it in the AST.
Definition: Sema.h:12185
clang::Sema::mergeInternalLinkageAttr
InternalLinkageAttr * mergeInternalLinkageAttr(Decl *D, const ParsedAttr &AL)
clang::Sema::SpecialMemberOverloadResult::Ambiguous
@ Ambiguous
Definition: Sema.h:1550
clang::Sema::TPL_TemplateTemplateArgumentMatch
@ TPL_TemplateTemplateArgumentMatch
We are matching the template parameter lists of a template template argument against the template par...
Definition: Sema.h:8296
clang::Sema::ActOnMSDependentExistsStmt
StmtResult ActOnMSDependentExistsStmt(SourceLocation KeywordLoc, bool IsIfExists, CXXScopeSpec &SS, UnqualifiedId &Name, Stmt *Nested)
Definition: SemaStmt.cpp:4635
clang::Sema::TUFragmentKind
TUFragmentKind
Definition: Sema.h:2112
clang::Sema::OMPIteratorData::Range
OMPIteratorExpr::IteratorRange Range
Definition: Sema.h:5722
clang::Sema::CompleteConstructorCall
bool CompleteConstructorCall(CXXConstructorDecl *Constructor, QualType DeclInitType, MultiExprArg ArgsPtr, SourceLocation Loc, SmallVectorImpl< Expr * > &ConvertedArgs, bool AllowExplicit=false, bool IsListInitialization=false)
Given a constructor and the set of arguments provided for the constructor, convert the arguments and ...
Definition: SemaDeclCXX.cpp:15675
clang::Sema::CheckUnresolvedLookupAccess
AccessResult CheckUnresolvedLookupAccess(UnresolvedLookupExpr *E, DeclAccessPair FoundDecl)
Definition: SemaAccess.cpp:1546
clang::Sema::AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction
void AddKnownFunctionAttributesForReplaceableGlobalAllocationFunction(FunctionDecl *FD)
If this function is a C++ replaceable global allocation function (C++2a [basic.stc....
Definition: SemaDecl.cpp:15240
clang::Sema::SizelessTypeDiagnoser
A derivative of BoundTypeDiagnoser for which the diagnostic's type parameter is preceded by a 0/1 enu...
Definition: Sema.h:2434
clang::Sema::ObjCSubscriptKind
ObjCSubscriptKind
Definition: Sema.h:3954
clang::Sema::isIncompatibleTypedef
bool isIncompatibleTypedef(TypeDecl *Old, TypedefNameDecl *New)
Definition: SemaDecl.cpp:2339
clang::Sema::ActOnExplicitBoolSpecifier
ExplicitSpecifier ActOnExplicitBoolSpecifier(Expr *E)
ActOnExplicitBoolSpecifier - Build an ExplicitSpecifier from an expression found in an explicit(bool)...
Definition: SemaDeclCXX.cpp:13271
clang::Sema::LookupMovingAssignment
CXXMethodDecl * LookupMovingAssignment(CXXRecordDecl *Class, unsigned Quals, bool RValueThis, unsigned ThisQuals)
Look up the moving assignment operator for the given class.
Definition: SemaLookup.cpp:3415
clang::Sema::buildLambdaScope
void buildLambdaScope(sema::LambdaScopeInfo *LSI, CXXMethodDecl *CallOperator, SourceRange IntroducerRange, LambdaCaptureDefault CaptureDefault, SourceLocation CaptureDefaultLoc, bool ExplicitParams, bool ExplicitResultType, bool Mutable)
Endow the lambda scope info with the relevant properties.
Definition: SemaLambda.cpp:483
clang::MSPropertyDecl
An instance of this class represents the declaration of a property member.
Definition: DeclCXX.h:4107
clang::Sema::adjustCCAndNoReturn
QualType adjustCCAndNoReturn(QualType ArgFunctionType, QualType FunctionType, bool AdjustExceptionSpec=false)
Adjust the type ArgFunctionType to match the calling convention, noreturn, and optionally the excepti...
Definition: SemaTemplateDeduction.cpp:4105
clang::Sema::SpecialMemberIsTrivial
bool SpecialMemberIsTrivial(CXXMethodDecl *MD, CXXSpecialMember CSM, TrivialABIHandling TAH=TAH_IgnoreTrivialABI, bool Diagnose=false)
Determine whether a defaulted or deleted special member function is trivial, as specified in C++11 [c...
Definition: SemaDeclCXX.cpp:9770
clang::Sema::TypeTagData
Definition: Sema.h:13419
clang::Sema::PragmaClangSection::PragmaLocation
SourceLocation PragmaLocation
Definition: Sema.h:645
clang::Sema::ActOnStartClassImplementation
Decl * ActOnStartClassImplementation(SourceLocation AtClassImplLoc, IdentifierInfo *ClassName, SourceLocation ClassLoc, IdentifierInfo *SuperClassname, SourceLocation SuperClassLoc, const ParsedAttributesView &AttrList)
Definition: SemaDeclObjC.cpp:1964
clang::Sema::IER_Exists
@ IER_Exists
The symbol exists.
Definition: Sema.h:5971
clang::Sema::CodeCompleter
CodeCompleteConsumer * CodeCompleter
Code-completion consumer.
Definition: Sema.h:596
clang::Sema::ActOnOpenMPParallelGenericLoopDirective
StmtResult ActOnOpenMPParallelGenericLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel loop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10327
clang::Sema::isOpenMPCapturedByRef
bool isOpenMPCapturedByRef(const ValueDecl *D, unsigned Level, unsigned OpenMPCaptureLevel) const
Return true if the provided declaration VD should be captured by reference.
Definition: SemaOpenMP.cpp:1994
clang::Sema::BuildPseudoDestructorExpr
ExprResult BuildPseudoDestructorExpr(Expr *Base, SourceLocation OpLoc, tok::TokenKind OpKind, const CXXScopeSpec &SS, TypeSourceInfo *ScopeType, SourceLocation CCLoc, SourceLocation TildeLoc, PseudoDestructorTypeStorage DestroyedType)
Definition: SemaExprCXX.cpp:7543
clang::Declarator
Information about one declarator, including the parsed type information and the identifier.
Definition: DeclSpec.h:1803
clang::Sema::AddOptnoneAttributeIfNoConflicts
void AddOptnoneAttributeIfNoConflicts(FunctionDecl *FD, SourceLocation Loc)
Adds the 'optnone' attribute to the function declaration if there are no conflicts; Loc represents th...
Definition: SemaAttr.cpp:1069
clang::Sema::CheckEnumUnderlyingType
bool CheckEnumUnderlyingType(TypeSourceInfo *TI)
Check that this is a valid underlying type for an enum declaration.
Definition: SemaDecl.cpp:15538
clang::Sema::translateTemplateArguments
void translateTemplateArguments(const ASTTemplateArgsPtr &In, TemplateArgumentListInfo &Out)
Translates template arguments as provided by the parser into template arguments used by semantic anal...
Definition: SemaTemplate.cpp:953
clang::Sema::ActOnFriendFunctionDecl
NamedDecl * ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
Definition: SemaDeclCXX.cpp:16938
clang::threadSafety::threadSafetyCleanup
void threadSafetyCleanup(BeforeSet *Cache)
Definition: ThreadSafety.cpp:2549
clang::Sema::AddOverloadCandidate
void AddOverloadCandidate(FunctionDecl *Function, DeclAccessPair FoundDecl, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool SuppressUserConversions=false, bool PartialOverloading=false, bool AllowExplicit=true, bool AllowExplicitConversion=false, ADLCallKind IsADLCandidate=ADLCallKind::NotADL, ConversionSequenceList EarlyConversions=None, OverloadCandidateParamOrder PO={})
AddOverloadCandidate - Adds the given function to the set of candidate functions, using the given fun...
Definition: SemaOverload.cpp:6333
clang::Sema::AlignPackInfo::getRawEncoding
static uint32_t getRawEncoding(const AlignPackInfo &Info)
Definition: Sema.h:689
clang::DeclaratorContext::Condition
@ Condition
clang::Sema::ExpressionEvaluationContextRecord
Data structure used to record current or nested expression evaluation contexts.
Definition: Sema.h:1432
clang::Sema::handleLambdaNumbering
void handleLambdaNumbering(CXXRecordDecl *Class, CXXMethodDecl *Method, Optional< std::tuple< bool, unsigned, unsigned, Decl * >> Mangling=None)
Number lambda for linkage purposes if necessary.
Definition: SemaLambda.cpp:428
clang::Sema::PragmaClangSectionKind
PragmaClangSectionKind
pragma clang section kind
Definition: Sema.h:628
clang::Sema::NestedNameSpecInfo::CCLoc
SourceLocation CCLoc
The location of the '::'.
Definition: Sema.h:6891
clang::Sema::CompleteVarTemplateSpecializationDecl
VarTemplateSpecializationDecl * CompleteVarTemplateSpecializationDecl(VarTemplateSpecializationDecl *VarSpec, VarDecl *PatternDecl, const MultiLevelTemplateArgumentList &TemplateArgs)
Instantiates a variable template specialization by completing it with appropriate type information an...
Definition: SemaTemplateInstantiateDecl.cpp:5533
clang::Sema::NTK_TypeAliasTemplate
@ NTK_TypeAliasTemplate
Definition: Sema.h:3363
clang::Sema::ActOnOpenMPMasterDirective
StmtResult ActOnOpenMPMasterDirective(Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp master' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10455
clang::LambdaCaptureInitKind::CopyInit
@ CopyInit
[a = b], [a = {b}]
clang::Sema::ActOnForEachLValueExpr
StmtResult ActOnForEachLValueExpr(Expr *E)
In an Objective C collection iteration statement: for (x in y) x can be an arbitrary l-value expressi...
Definition: SemaStmt.cpp:2185
CleanupInfo.h
clang::OpenMPScheduleClauseModifier
OpenMPScheduleClauseModifier
OpenMP modifiers for 'schedule' clause.
Definition: OpenMPKinds.h:38
clang::Sema::VerifyICEDiagnoser::diagnoseNotICE
virtual SemaDiagnosticBuilder diagnoseNotICE(Sema &S, SourceLocation Loc)=0
clang::Sema::diagnoseZeroToNullptrConversion
void diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E)
Warn when implicitly casting 0 to nullptr.
Definition: Sema.cpp:624
clang::Sema::NamedReturnInfo::isMoveEligible
bool isMoveEligible() const
Definition: Sema.h:5157
clang::Sema::ActOnDefaultStmt
StmtResult ActOnDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc, Stmt *SubStmt, Scope *CurScope)
Definition: SemaStmt.cpp:531
clang::Sema::ActOnOpenMPSeqCstClause
OMPClause * ActOnOpenMPSeqCstClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'seq_cst' clause.
Definition: SemaOpenMP.cpp:16589
clang::Sema::ReplaceAutoTypeSourceInfo
TypeSourceInfo * ReplaceAutoTypeSourceInfo(TypeSourceInfo *TypeWithAuto, QualType Replacement)
Definition: SemaTemplateDeduction.cpp:4836
clang::Sema::isValidPointerAttrType
bool isValidPointerAttrType(QualType T, bool RefOkay=false)
Determine if type T is a valid subject for a nonnull and similar attributes.
clang::prec::Level
Level
Definition: OperatorPrecedence.h:26
clang::Sema::IdentifyCUDAPreference
CUDAFunctionPreference IdentifyCUDAPreference(const FunctionDecl *Caller, const FunctionDecl *Callee)
Identifies relative preference of a given Caller/Callee combination, based on their host/device attri...
Definition: SemaCUDA.cpp:207
clang::Sema::BuildVAArgExpr
ExprResult BuildVAArgExpr(SourceLocation BuiltinLoc, Expr *E, TypeSourceInfo *TInfo, SourceLocation RPLoc)
Definition: SemaExpr.cpp:16230
clang::Sema::DiagnoseTypeArgsAndProtocols
void DiagnoseTypeArgsAndProtocols(IdentifierInfo *ProtocolId, SourceLocation ProtocolLoc, IdentifierInfo *TypeArgId, SourceLocation TypeArgLoc, bool SelectProtocolFirst=false)
Definition: SemaDeclObjC.cpp:1400
clang::Sema::BuildCXXMemberCallExpr
ExprResult BuildCXXMemberCallExpr(Expr *Exp, NamedDecl *FoundDecl, CXXConversionDecl *Method, bool HadMultipleCandidates)
Definition: SemaExprCXX.cpp:7835
clang::Sema::ActOnStartNamespaceDef
Decl * ActOnStartNamespaceDef(Scope *S, SourceLocation InlineLoc, SourceLocation NamespaceLoc, SourceLocation IdentLoc, IdentifierInfo *Ident, SourceLocation LBrace, const ParsedAttributesView &AttrList, UsingDirectiveDecl *&UsingDecl)
ActOnStartNamespaceDef - This is called at the start of a namespace definition.
Definition: SemaDeclCXX.cpp:11113
clang::Sema::getImplicitCodeSegOrSectionAttrForFunction
Attr * getImplicitCodeSegOrSectionAttrForFunction(const FunctionDecl *FD, bool IsDefinition)
Returns an implicit CodeSegAttr if a __declspec(code_seg) is found on a containing class.
Definition: SemaDecl.cpp:10306
clang::Sema::SpecialMemberOverloadResult::getKind
Kind getKind() const
Definition: Sema.h:1565
clang::Sema::CanUseDecl
bool CanUseDecl(NamedDecl *D, bool TreatUnavailableAsInvalid)
Determine whether the use of this declaration is valid, without emitting diagnostics.
Definition: SemaExpr.cpp:61
clang::Sema::ActOnOpenMPClause
OMPClause * ActOnOpenMPClause(OpenMPClauseKind Kind, SourceLocation StartLoc, SourceLocation EndLoc)
Definition: SemaOpenMP.cpp:16405
clang::Sema::ActOnCXXThrow
ExprResult ActOnCXXThrow(Scope *S, SourceLocation OpLoc, Expr *expr)
ActOnCXXThrow - Parse throw expressions.
Definition: SemaExprCXX.cpp:820
clang::Sema::StartOpenMPClause
void StartOpenMPClause(OpenMPClauseKind K)
Start analysis of clauses.
Definition: SemaOpenMP.cpp:2542
clang::Sema::ActOnPragmaWeakAlias
void ActOnPragmaWeakAlias(IdentifierInfo *WeakName, IdentifierInfo *AliasName, SourceLocation PragmaLoc, SourceLocation WeakNameLoc, SourceLocation AliasNameLoc)
ActOnPragmaWeakAlias - Called on well formed #pragma weak ident = ident.
Definition: SemaDecl.cpp:18796
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2049
clang::Sema::EraseUnwantedCUDAMatches
void EraseUnwantedCUDAMatches(const FunctionDecl *Caller, SmallVectorImpl< std::pair< DeclAccessPair, FunctionDecl * >> &Matches)
Finds a function in Matches with highest calling priority from Caller context and erases all function...
Definition: SemaCUDA.cpp:272
clang::Sema::MarkUsedTemplateParameters
void MarkUsedTemplateParameters(const Expr *E, bool OnlyDeduced, unsigned Depth, llvm::SmallBitVector &Used)
Mark which template parameters are used in a given expression.
Definition: SemaTemplateDeduction.cpp:6031
clang::FieldDeclarator
This little struct is used to capture information about structure field declarators,...
Definition: DeclSpec.h:2607
clang::Sema::getSpecialMember
CXXSpecialMember getSpecialMember(const CXXMethodDecl *MD)
Definition: Sema.h:3487
clang::Sema::isCompleteType
bool isCompleteType(SourceLocation Loc, QualType T, CompleteTypeKind Kind=CompleteTypeKind::Default)
Definition: Sema.h:2591
clang::FileID
An opaque identifier used by SourceManager which refers to a source file (MemoryBuffer) along with it...
Definition: SourceLocation.h:38
clang::Sema::ProcessPropertyDecl
void ProcessPropertyDecl(ObjCPropertyDecl *property)
Process the specified property declaration and create decls for the setters and getters as needed.
Definition: SemaObjCProperty.cpp:2378
clang::Sema::AddCFAuditedAttribute
void AddCFAuditedAttribute(Decl *D)
AddCFAuditedAttribute - Check whether we're currently within '#pragma clang arc_cf_code_audited' and,...
Definition: SemaAttr.cpp:767
clang::Sema::CaptureHasSideEffects
bool CaptureHasSideEffects(const sema::Capture &From)
Does copying/destroying the captured variable have side effects?
Definition: SemaLambda.cpp:1655
clang::Sema::ActOnOpenMPTargetUpdateDirective
StmtResult ActOnOpenMPTargetUpdateDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc, Stmt *AStmt)
Called on well-formed '#pragma omp target update'.
Definition: SemaOpenMP.cpp:12802
clang::Sema::ActOnReturnStmt
StmtResult ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp, Scope *CurScope)
Definition: SemaStmt.cpp:3880
clang::Sema::RequireCompleteSizedType
bool RequireCompleteSizedType(SourceLocation Loc, QualType T, unsigned DiagID, const Ts &... Args)
Definition: Sema.h:2616
clang::Sema::CodeCompletePreprocessorMacroName
void CodeCompletePreprocessorMacroName(bool IsDefinition)
Definition: SemaCodeComplete.cpp:9784
clang::Sema::RTC_Unknown
@ RTC_Unknown
Definition: Sema.h:10341
clang::SourceLocation::isValid
bool isValid() const
Return true if this is a valid SourceLocation object.
Definition: SourceLocation.h:110
clang::PreferredTypeBuilder::enterDesignatedInitializer
void enterDesignatedInitializer(SourceLocation Tok, QualType BaseType, const Designation &D)
Handles e.g. BaseType{ .D = Tok...
Definition: SemaCodeComplete.cpp:417
clang::Sema::PCC_Template
@ PCC_Template
Code completion occurs following one or more template headers.
Definition: Sema.h:12971
clang::CXXBaseSpecifier
Represents a base class of a C++ class.
Definition: DeclCXX.h:146
clang::Sema::BuildUnresolvedCoawaitExpr
ExprResult BuildUnresolvedCoawaitExpr(SourceLocation KwLoc, Expr *E, UnresolvedLookupExpr *Lookup)
Definition: SemaCoroutine.cpp:825
clang::CorrectionCandidateCallback
Base class for callback objects used by Sema::CorrectTypo to check the validity of a potential typo c...
Definition: TypoCorrection.h:281
clang::Sema::RestoreNestedNameSpecifierAnnotation
void RestoreNestedNameSpecifierAnnotation(void *Annotation, SourceRange AnnotationRange, CXXScopeSpec &SS)
Given an annotation pointer for a nested-name-specifier, restore the nested-name-specifier structure.
Definition: SemaCXXScopeSpec.cpp:1026
clang::Sema::getCallingConvAttributedType
const AttributedType * getCallingConvAttributedType(QualType T) const
Get the outermost AttributedType node that sets a calling convention.
Definition: SemaDecl.cpp:3289
clang::Sema::ActOnConceptDefinition
Decl * ActOnConceptDefinition(Scope *S, MultiTemplateParamsArg TemplateParameterLists, IdentifierInfo *Name, SourceLocation NameLoc, Expr *ConstraintExpr)
Definition: SemaTemplate.cpp:8613
clang::Sema::NameClassification::Concept
static NameClassification Concept(TemplateName Name)
Definition: Sema.h:2824
clang::Attr
Attr - This represents one attribute.
Definition: Attr.h:44
clang::Sema::OriginalCallArg
brief A function argument from which we performed template argument
Definition: Sema.h:8881
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6473
clang::Sema::ActOnIntegerConstant
ExprResult ActOnIntegerConstant(SourceLocation Loc, uint64_t Val)
Definition: SemaExpr.cpp:3716
clang::Sema::TPC_ClassTemplate
@ TPC_ClassTemplate
Definition: Sema.h:7998
clang::Sema::ActOnMemberAccessExtraArgs
Definition: Sema.h:5737
clang::Sema::mergeAvailabilityAttr
AvailabilityAttr * mergeAvailabilityAttr(NamedDecl *D, const AttributeCommonInfo &CI, IdentifierInfo *Platform, bool Implicit, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool IsUnavailable, StringRef Message, bool IsStrict, StringRef Replacement, AvailabilityMergeKind AMK, int Priority)
Attribute merging methods. Return true if a new attribute was added.
clang::LocalInstantiationScope
A stack-allocated class that identifies which local variable declaration instantiations are present i...
Definition: Template.h:270
clang::Sema::SetMemberAccessSpecifier
bool SetMemberAccessSpecifier(NamedDecl *MemberDecl, NamedDecl *PrevMemberDecl, AccessSpecifier LexicalAS)
SetMemberAccessSpecifier - Set the access specifier of a member.
Definition: SemaAccess.cpp:39
clang::Sema::CheckOpenMPLinearDecl
bool CheckOpenMPLinearDecl(const ValueDecl *D, SourceLocation ELoc, OpenMPLinearClauseKind LinKind, QualType Type, bool IsDeclareSimd=false)
Checks that the specified declaration matches requirements for the linear decls.
Definition: SemaOpenMP.cpp:19012
clang::Sema::DeviceDiagnosticReason::CudaAll
@ CudaAll
clang::Sema::ActOnOpenMPEndDeclareVariant
void ActOnOpenMPEndDeclareVariant()
Handle a omp end declare variant.
Definition: SemaOpenMP.cpp:2488
clang::Sema::LookupConstructors
DeclContextLookupResult LookupConstructors(CXXRecordDecl *Class)
Look up the constructors for the given class.
Definition: SemaLookup.cpp:3379
clang::Sema::ActOnOpenMPDeclareReductionInitializerEnd
void ActOnOpenMPDeclareReductionInitializerEnd(Decl *D, Expr *Initializer, VarDecl *OmpPrivParm)
Finish current declare reduction construct initializer.
Definition: SemaOpenMP.cpp:21395
clang::Sema::UPPC_PartialSpecialization
@ UPPC_PartialSpecialization
Partial specialization.
Definition: Sema.h:8486
clang::Sema::DelegatingCtorDecls
DelegatingCtorDeclsType DelegatingCtorDecls
All the delegating constructors seen so far in the file, used for cycle detection at the end of the T...
Definition: Sema.h:1057
clang::Sema::SFINAETrap::SFINAETrap
SFINAETrap(Sema &SemaRef, bool AccessCheckingSFINAE=false)
Definition: Sema.h:9531
clang::ConversionSequenceList
llvm::MutableArrayRef< ImplicitConversionSequence > ConversionSequenceList
A list of implicit conversion sequences for the arguments of an OverloadCandidate.
Definition: Overload.h:803
clang::OMPRequiresDecl
This represents '#pragma omp requires...' directive.
Definition: DeclOpenMP.h:416
clang::Sema::SubstNestedNameSpecifierLoc
NestedNameSpecifierLoc SubstNestedNameSpecifierLoc(NestedNameSpecifierLoc NNS, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:3602
clang::Sema::checkIllFormedTrivialABIStruct
void checkIllFormedTrivialABIStruct(CXXRecordDecl &RD)
Check that the C++ class annoated with "trivial_abi" satisfies all the conditions that are needed for...
Definition: SemaDeclCXX.cpp:10045
clang::Sema::BuildUsingPackDecl
NamedDecl * BuildUsingPackDecl(NamedDecl *InstantiatedFrom, ArrayRef< NamedDecl * > Expansions)
Definition: SemaDeclCXX.cpp:12593
clang::Sema::lookupOpenMPDeclareTargetName
NamedDecl * lookupOpenMPDeclareTargetName(Scope *CurScope, CXXScopeSpec &ScopeSpec, const DeclarationNameInfo &Id)
Searches for the provided declaration name for OpenMP declare target directive.
Definition: SemaOpenMP.cpp:21945
clang::Sema::FilterUsingLookup
void FilterUsingLookup(Scope *S, LookupResult &lookup)
Remove decls we can't actually see from a lookup being used to declare shadow using decls.
Definition: SemaDeclCXX.cpp:12261
clang::Sema::MergeSYCLIntelPipeIOAttr
SYCLIntelPipeIOAttr * MergeSYCLIntelPipeIOAttr(Decl *D, const SYCLIntelPipeIOAttr &A)
clang::Sema::ActOnFinishDelayedMemberDeclarations
void ActOnFinishDelayedMemberDeclarations(Scope *S, Decl *Record)
Definition: SemaDeclCXX.cpp:10356
clang::Sema::ActOnStartCXXInClassMemberInitializer
void ActOnStartCXXInClassMemberInitializer()
Enter a new C++ default initializer scope.
Definition: SemaDeclCXX.cpp:4008
clang::Sema::CodeCompleteObjCForCollection
void CodeCompleteObjCForCollection(Scope *S, DeclGroupPtrTy IterationVar)
Definition: SemaCodeComplete.cpp:8190
clang::Sema::EvaluateImplicitExceptionSpec
void EvaluateImplicitExceptionSpec(SourceLocation Loc, FunctionDecl *FD)
Evaluate the implicit exception specification for a defaulted special member function.
Definition: SemaDeclCXX.cpp:7391
clang::Sema::addSyclVarDecl
void addSyclVarDecl(VarDecl *VD)
Definition: Sema.h:13674
clang::Sema::ActOnCXXThis
ExprResult ActOnCXXThis(SourceLocation loc)
Definition: SemaExprCXX.cpp:1380
clang::Sema::MissingImportKind
MissingImportKind
Kinds of missing import.
Definition: Sema.h:3299
clang::Sema::ActOnOpenMPDistributeParallelForDirective
StmtResult ActOnOpenMPDistributeParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp distribute parallel for' after parsing of the associated statement...
Definition: SemaOpenMP.cpp:13249
clang::Sema::ActOnDefaultCtorInitializers
void ActOnDefaultCtorInitializers(Decl *CDtorDecl)
Definition: SemaDeclCXX.cpp:5761
clang::Sema::TemplateNameIsRequiredTag
TemplateNameIsRequiredTag
Definition: Sema.h:7851
clang::Sema::ActOnParenExpr
ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R, Expr *E)
Definition: SemaExpr.cpp:4198
clang::Sema::BumpAlloc
llvm::BumpPtrAllocator BumpAlloc
Definition: Sema.h:1595
clang::Sema::ExpressionEvaluationContextRecord::VolatileAssignmentLHSs
SmallVector< Expr *, 2 > VolatileAssignmentLHSs
Expressions appearing as the LHS of a volatile assignment in this context.
Definition: Sema.h:1471
clang::Sema::ParsingDeclState
DelayedDiagnosticsState ParsingDeclState
Definition: Sema.h:1099
clang::Sema::CheckOMPThreadPrivateDecl
OMPThreadPrivateDecl * CheckOMPThreadPrivateDecl(SourceLocation Loc, ArrayRef< Expr * > VarList)
Builds a new OpenMPThreadPrivateDecl and checks its correctness.
Definition: SemaOpenMP.cpp:2975
clang::Sema::SetDeclDeleted
void SetDeclDeleted(Decl *dcl, SourceLocation DelLoc)
Definition: SemaDeclCXX.cpp:17254
clang::Sema::ActOnTagStartDefinition
void ActOnTagStartDefinition(Scope *S, Decl *TagDecl)
ActOnTagStartDefinition - Invoked when we have entered the scope of a tag's definition (e....
Definition: SemaDecl.cpp:16769
unsigned
clang::Sema::OSMK_NonRetainingInit
@ OSMK_NonRetainingInit
Definition: Sema.h:10160
clang::Sema::MergeSYCLIntelMaxWorkGroupSizeAttr
SYCLIntelMaxWorkGroupSizeAttr * MergeSYCLIntelMaxWorkGroupSizeAttr(Decl *D, const SYCLIntelMaxWorkGroupSizeAttr &A)
clang::Sema::NameClassification::Template
TemplateName Template
Definition: Sema.h:2767
clang::Sema::IgnoredValueConversions
ExprResult IgnoredValueConversions(Expr *E)
IgnoredValueConversions - Given that an expression's result is syntactically ignored,...
Definition: SemaExprCXX.cpp:7973
clang::Sema::DiagnoseCommaOperator
void DiagnoseCommaOperator(const Expr *LHS, SourceLocation Loc)
Definition: SemaExpr.cpp:13760
clang::Sema::BoundTypeDiagnoser
Definition: Sema.h:2393
clang::Sema::CheckFunctionConstraints
bool CheckFunctionConstraints(const FunctionDecl *FD, ConstraintSatisfaction &Satisfaction, SourceLocation UsageLoc=SourceLocation())
Check whether the given function decl's trailing requires clause is satisfied, if any.
Definition: SemaConcept.cpp:362
clang::Sema::ExpressionEvaluationContextRecord::isConstantEvaluated
bool isConstantEvaluated() const
Definition: Sema.h:1507
clang::Sema::PCSK_Relro
@ PCSK_Relro
Definition: Sema.h:634
clang::Sema::LateInstantiatedAttribute::NewDecl
Decl * NewDecl
Definition: Sema.h:9831
clang::Sema::ActOnAddrLabel
ExprResult ActOnAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc, LabelDecl *TheDecl)
ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
Definition: SemaExpr.cpp:15563
clang::SYCLIntegrationHeader::kind_accessor
@ kind_accessor
Definition: Sema.h:316
clang::Sema::checkNonTrivialCUnion
void checkNonTrivialCUnion(QualType QT, SourceLocation Loc, NonTrivialCUnionContext UseContext, unsigned NonTrivialKind)
Emit diagnostics if a non-trivial C union type or a struct that contains a non-trivial C union is use...
Definition: SemaDecl.cpp:12347
clang::Sema::adjustContextForLocalExternDecl
static bool adjustContextForLocalExternDecl(DeclContext *&DC)
Adjust the DeclContext for a function or variable that might be a function-local external declaration...
Definition: SemaDecl.cpp:6943
clang::Sema::ActOnFunctionDeclarator
NamedDecl * ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC, TypeSourceInfo *TInfo, LookupResult &Previous, MultiTemplateParamsArg TemplateParamLists, bool &AddToScope)
Definition: SemaDecl.cpp:9195
clang::Sema::ActOnSYCLBuiltinBaseTypeExpr
ExprResult ActOnSYCLBuiltinBaseTypeExpr(ParsedType PT, Expr *Idx)
Get a value based on the type of the given base number so that callers can wrap it in a decltype() to...
Definition: SemaSYCL.cpp:275
clang::Sema::isUsualDeallocationFunction
bool isUsualDeallocationFunction(const CXXMethodDecl *FD)
Definition: SemaExprCXX.cpp:1603
clang::Sema::CompleteTypeKind::Normal
@ Normal
Apply the normal rules for complete types.
clang::Sema::ActOnCondition
ConditionResult ActOnCondition(Scope *S, SourceLocation Loc, Expr *SubExpr, ConditionKind CK, bool MissingOK=false)
Definition: SemaExpr.cpp:19633
clang::Sema::UPPC_EnumeratorValue
@ UPPC_EnumeratorValue
The enumerator value.
Definition: Sema.h:8462
clang::Sema::StdNamespace
LazyDeclPtr StdNamespace
The C++ "std" namespace, where the standard library resides.
Definition: Sema.h:1292
clang::Sema::ActOnOpenMPTaskwaitDirective
StmtResult ActOnOpenMPTaskwaitDirective(ArrayRef< OMPClause * > Clauses, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp taskwait'.
Definition: SemaOpenMP.cpp:10745
clang::Sema::PushCompoundScope
void PushCompoundScope(bool IsStmtExpr)
Definition: Sema.cpp:2325
clang::Sema::ForceDeclarationOfImplicitMembers
void ForceDeclarationOfImplicitMembers(CXXRecordDecl *Class)
Force the declaration of any implicitly-declared members of this class.
Definition: SemaLookup.cpp:1032
clang::Sema::CreateGenericSelectionExpr
ExprResult CreateGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< TypeSourceInfo * > Types, ArrayRef< Expr * > Exprs)
Definition: SemaExpr.cpp:1677
clang::Sema::NameClassificationKind
NameClassificationKind
Describes the result of the name lookup and resolution performed by ClassifyName().
Definition: Sema.h:2723
clang::sema::CapturingScopeInfo
Definition: ScopeInfo.h:660
clang::Sema::isSFINAEContext
Optional< sema::TemplateDeductionInfo * > isSFINAEContext() const
Determines whether we are currently in a context where template argument substitution failures are no...
Definition: SemaTemplateInstantiate.cpp:827
clang::Sema::IncompatiblePointerDiscardsQualifiers
@ IncompatiblePointerDiscardsQualifiers
IncompatiblePointerDiscardsQualifiers - The assignment discards qualifiers that we don't permit to be...
Definition: Sema.h:12148
clang::Sema::AllowedExplicit
AllowedExplicit
Definition: Sema.h:3780
clang::Sema::BuildModuleInclude
void BuildModuleInclude(SourceLocation DirectiveLoc, Module *Mod)
Definition: SemaModule.cpp:558
clang::Sema::ActOnOpenMPTaskLoopDirective
StmtResult ActOnOpenMPTaskLoopDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp taskloop' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12922
clang::Sema::LookupInSuper
bool LookupInSuper(LookupResult &R, CXXRecordDecl *Class)
Perform qualified name lookup into all base classes of the given class.
Definition: SemaLookup.cpp:2564
clang::Sema::CollectIvarsToConstructOrDestruct
void CollectIvarsToConstructOrDestruct(ObjCInterfaceDecl *OI, SmallVectorImpl< ObjCIvarDecl * > &Ivars)
CollectIvarsToConstructOrDestruct - Collect those ivars which require initialization.
Definition: SemaDeclObjC.cpp:5227
clang::MSInheritanceModel
MSInheritanceModel
Assigned inheritance model for a class in the MS C++ ABI.
Definition: Specifiers.h:369
clang::Sema::ActOnMemInitializer
MemInitResult ActOnMemInitializer(Decl *ConstructorD, Scope *S, CXXScopeSpec &SS, IdentifierInfo *MemberOrBase, ParsedType TemplateTypeTy, const DeclSpec &DS, SourceLocation IdLoc, SourceLocation LParenLoc, ArrayRef< Expr * > Args, SourceLocation RParenLoc, SourceLocation EllipsisLoc)
Handle a C++ member initializer using parentheses syntax.
Definition: SemaDeclCXX.cpp:4167
clang::InitializedEntity
Describes an entity that is being initialized.
Definition: Initialization.h:47
clang::Sema::LookupInlineAsmVarDeclField
ExprResult LookupInlineAsmVarDeclField(Expr *RefExpr, StringRef Member, SourceLocation AsmLoc)
Definition: SemaStmtAsm.cpp:884
clang::Sema::ActOnOpenMPHintClause
OMPClause * ActOnOpenMPHintClause(Expr *Hint, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'hint' clause.
Definition: SemaOpenMP.cpp:21698
clang::Sema::ActOnCapturedRegionStart
void ActOnCapturedRegionStart(SourceLocation Loc, Scope *CurScope, CapturedRegionKind Kind, unsigned NumParams)
Definition: SemaStmt.cpp:4713
clang::Sema::OptimizeOffPragmaLocation
SourceLocation OptimizeOffPragmaLocation
This represents the last location of a "#pragma clang optimize off" directive if such a directive has...
Definition: Sema.h:933
clang::Sema::ActOnConversionDeclarator
Decl * ActOnConversionDeclarator(CXXConversionDecl *Conversion)
ActOnConversionDeclarator - Called by ActOnDeclarator to complete the declaration of the given C++ co...
Definition: SemaDeclCXX.cpp:10894
clang::SYCLIntegrationHeader
Definition: Sema.h:310
clang::Sema::CodeSynthesisContext::RewritingOperatorAsSpaceship
@ RewritingOperatorAsSpaceship
We are rewriting a comparison operator in terms of an operator<=>.
Definition: Sema.h:9130
clang::Sema::ExitDeclaratorContext
void ExitDeclaratorContext(Scope *S)
Definition: SemaDecl.cpp:1375
clang::Sema::CXXThisScopeRAII::CXXThisScopeRAII
CXXThisScopeRAII(Sema &S, Decl *ContextDecl, Qualifiers CXXThisTypeQuals, bool Enabled=true)
Introduce a new scope where 'this' may be allowed (when enabled), using the given declaration (which ...
Definition: SemaExprCXX.cpp:1220
clang::Sema::BuildCXXNoexceptExpr
ExprResult BuildCXXNoexceptExpr(SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen)
Definition: SemaExprCXX.cpp:7897
clang::Sema::MergeSYCLAddIRAttributesKernelParameterAttr
SYCLAddIRAttributesKernelParameterAttr * MergeSYCLAddIRAttributesKernelParameterAttr(Decl *D, const SYCLAddIRAttributesKernelParameterAttr &A)
clang::TypedefNameDecl
Base class for declarations which introduce a typedef-name.
Definition: Decl.h:3184
clang::PragmaMSStructKind
PragmaMSStructKind
Definition: PragmaKinds.h:23
clang::Sema::FunctionScopeRAII::S
Sema & S
Definition: Sema.h:5030
clang::Sema::TemplateParameterListEqualKind
TemplateParameterListEqualKind
Enumeration describing how template parameter lists are compared for equality.
Definition: Sema.h:8267
clang::Sema::UPPC_BaseType
@ UPPC_BaseType
The base type of a class type.
Definition: Sema.h:8444
clang::Sema::BuildTemplateIdExpr
ExprResult BuildTemplateIdExpr(const CXXScopeSpec &SS, SourceLocation TemplateKWLoc, LookupResult &R, bool RequiresADL, const TemplateArgumentListInfo *TemplateArgs)
Definition: SemaTemplate.cpp:4716
clang::Sema::AlignPackStack
PragmaStack< AlignPackInfo > AlignPackStack
Definition: Sema.h:858
clang::Sema::OCK_Implementation
@ OCK_Implementation
Definition: Sema.h:9948
clang::CodeCompletionAllocator
An allocator used specifically for the purpose of code completion.
Definition: CodeCompleteConsumer.h:639
clang::Sema::SubstType
TypeSourceInfo * SubstType(TypeSourceInfo *T, const MultiLevelTemplateArgumentList &TemplateArgs, SourceLocation Loc, DeclarationName Entity, bool AllowDeducedTST=false)
Perform substitution on the type T with a given set of template arguments.
Definition: SemaTemplateInstantiate.cpp:2143
clang::Sema::ConvertParamDefaultArgument
ExprResult ConvertParamDefaultArgument(ParmVarDecl *Param, Expr *DefaultArg, SourceLocation EqualLoc)
Definition: SemaDeclCXX.cpp:258
DarwinSDKInfo.h
clang::Sema::RTC_Compatible
@ RTC_Compatible
Definition: Sema.h:10339
clang::Sema::findFailedBooleanCondition
std::pair< Expr *, std::string > findFailedBooleanCondition(Expr *Cond)
Find the failed Boolean condition within a given Boolean constant expression, and describe it with a ...
Definition: SemaTemplate.cpp:3608
clang::Sema::LateInstantiatedAttrVec
SmallVector< LateInstantiatedAttribute, 16 > LateInstantiatedAttrVec
Definition: Sema.h:9838
clang::Sema::AMK_ProtocolImplementation
@ AMK_ProtocolImplementation
Merge availability attributes for an implementation of a protocol requirement.
Definition: Sema.h:3647
clang::Sema::ActOnParamUnparsedDefaultArgument
void ActOnParamUnparsedDefaultArgument(Decl *param, SourceLocation EqualLoc, SourceLocation ArgLoc)
ActOnParamUnparsedDefaultArgument - We've seen a default argument for a function parameter,...
Definition: SemaDeclCXX.cpp:363
clang::Sema::FinishCXXForRangeStmt
StmtResult FinishCXXForRangeStmt(Stmt *ForRange, Stmt *Body)
FinishCXXForRangeStmt - Attach the body to a C++0x for-range statement.
Definition: SemaStmt.cpp:3247
clang::SYCLIntegrationHeader::SYCLIntegrationHeader
SYCLIntegrationHeader(Sema &S)
Definition: SemaSYCL.cpp:4847
clang::Sema::ActOnStartRequiresExpr
RequiresExprBodyDecl * ActOnStartRequiresExpr(SourceLocation RequiresKWLoc, ArrayRef< ParmVarDecl * > LocalParameters, Scope *BodyScope)
Definition: SemaExprCXX.cpp:8924
clang::Sema::NTK_TypeAlias
@ NTK_TypeAlias
Definition: Sema.h:3361
clang::Sema::ActOnOpenMPSingleDirective
StmtResult ActOnOpenMPSingleDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp single' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10424
clang::Sema::isObjCPointerConversion
bool isObjCPointerConversion(QualType FromType, QualType ToType, QualType &ConvertedType, bool &IncompatibleObjC)
isObjCPointerConversion - Determines whether this is an Objective-C pointer conversion.
Definition: SemaOverload.cpp:2520
clang::ObjCContainerDecl
ObjCContainerDecl - Represents a container for method declarations.
Definition: DeclObjC.h:944
clang::Sema::isMemberAccessibleForDeletion
bool isMemberAccessibleForDeletion(CXXRecordDecl *NamingClass, DeclAccessPair Found, QualType ObjectType, SourceLocation Loc, const PartialDiagnostic &Diag)
Is the given member accessible for the purposes of deciding whether to define a special member functi...
Definition: SemaAccess.cpp:1581
clang::Sema::ModuleImportState::PrivateFragment
@ PrivateFragment
after 'module :private;'.
clang::DeclContextLookupResult
The results of name lookup within a DeclContext.
Definition: DeclBase.h:1300
clang::Sema::CurrentCUDATarget
CUDAFunctionTarget CurrentCUDATarget()
Gets the CUDA target for the current context.
Definition: Sema.h:12827
clang::Sema::IncompatibleVectors
@ IncompatibleVectors
IncompatibleVectors - The assignment is between two vector types that have the same size,...
Definition: Sema.h:12164
clang::Sema::CreateBuiltinArraySubscriptExpr
ExprResult CreateBuiltinArraySubscriptExpr(Expr *Base, SourceLocation LLoc, Expr *Idx, SourceLocation RLoc)
Definition: SemaExpr.cpp:5672
clang::Sema::MergeSYCLDeviceHasAttr
SYCLDeviceHasAttr * MergeSYCLDeviceHasAttr(Decl *D, const SYCLDeviceHasAttr &A)
clang::Sema::getCudaConfigureFuncName
std::string getCudaConfigureFuncName() const
Returns the name of the launch configuration function.
Definition: SemaCUDA.cpp:953
clang::Sema::CheckTypedefForVariablyModifiedType
void CheckTypedefForVariablyModifiedType(Scope *S, TypedefNameDecl *D)
Definition: SemaDecl.cpp:6398
clang::Sema::TDK_Success
@ TDK_Success
Template argument deduction was successful.
Definition: Sema.h:8809
clang::Sema::diagnoseArgDependentDiagnoseIfAttrs
bool diagnoseArgDependentDiagnoseIfAttrs(const FunctionDecl *Function, const Expr *ThisArg, ArrayRef< const Expr * > Args, SourceLocation Loc)
Emit diagnostics for the diagnose_if attributes on Function, ignoring any non-ArgDependent DiagnoseIf...
Definition: SemaOverload.cpp:6781
clang::Sema::ContextualImplicitConverter::~ContextualImplicitConverter
virtual ~ContextualImplicitConverter()
Definition: Sema.h:3923
clang::Sema::RequiredTemplateKind
Whether and why a template name is required in this lookup.
Definition: Sema.h:7853
clang::Sema::PragmaStack::DefaultValue
ValueType DefaultValue
Definition: Sema.h:842
clang::Sema::MaxAlignmentExponent
static const unsigned MaxAlignmentExponent
The maximum alignment, same as in llvm::Value.
Definition: Sema.h:575
clang::Sema::ActOnSizeofParameterPackExpr
ExprResult ActOnSizeofParameterPackExpr(Scope *S, SourceLocation OpLoc, IdentifierInfo &Name, SourceLocation NameLoc, SourceLocation RParenLoc)
Called when an expression computing the size of a parameter pack is parsed.
Definition: SemaTemplateVariadic.cpp:1004
clang::Sema::ActOnOpenMPNumThreadsClause
OMPClause * ActOnOpenMPNumThreadsClause(Expr *NumThreads, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'num_threads' clause.
Definition: SemaOpenMP.cpp:15668
clang::Sema::PushUsingDirective
void PushUsingDirective(Scope *S, UsingDirectiveDecl *UDir)
Definition: SemaDeclCXX.cpp:11727
clang::TU_Complete
@ TU_Complete
The translation unit is a complete translation unit.
Definition: LangOptions.h:759
clang::Sema::mergeCodeSegAttr
CodeSegAttr * mergeCodeSegAttr(Decl *D, const AttributeCommonInfo &CI, StringRef Name)
clang::Sema::IsBuildingRecoveryCallExpr
bool IsBuildingRecoveryCallExpr
Flag indicating if Sema is building a recovery call expression.
Definition: Sema.h:939
clang::Sema::ParseTypedefDecl
TypedefDecl * ParseTypedefDecl(Scope *S, Declarator &D, QualType T, TypeSourceInfo *TInfo)
Subroutines of ActOnDeclarator().
Definition: SemaDecl.cpp:15481
clang::Sema::WeakUndeclaredIdentifiers
llvm::MapVector< IdentifierInfo *, llvm::SetVector< WeakInfo, llvm::SmallVector< WeakInfo, 1u >, llvm::SmallDenseSet< WeakInfo, 2u, WeakInfo::DenseMapInfoByAliasOnly > > > WeakUndeclaredIdentifiers
WeakUndeclaredIdentifiers - Identifiers contained in #pragma weak before declared.
Definition: Sema.h:1265
clang::Sema::AdjustDeclIfTemplate
TemplateDecl * AdjustDeclIfTemplate(Decl *&Decl)
AdjustDeclIfTemplate - If the given decl happens to be a template, reset the parameter D to reference...
Definition: SemaTemplate.cpp:898
clang::Sema::AlignPackInfo::getAlignMode
Mode getAlignMode() const
Definition: Sema.h:720
clang::Sema::OpenCLFeatures
OpenCLOptions OpenCLFeatures
Definition: Sema.h:582
clang::Sema::handleTagNumbering
void handleTagNumbering(const TagDecl *Tag, Scope *TagScope)
Definition: SemaDecl.cpp:4586
clang::MemberExpr
MemberExpr - [C99 6.5.2.3] Structure and Union Members.
Definition: Expr.h:3220
clang::Sema::RTC_Incompatible
@ RTC_Incompatible
Definition: Sema.h:10340
clang::TypeLoc::getSourceRange
SourceRange getSourceRange() const LLVM_READONLY
Get the full source range.
Definition: TypeLoc.h:152
clang::CXXBasePaths
BasePaths - Represents the set of paths from a derived class to one of its (direct or indirect) bases...
Definition: CXXInheritance.h:117
clang::Sema::CodeCompletePreprocessorMacroArgument
void CodeCompletePreprocessorMacroArgument(Scope *S, IdentifierInfo *Macro, MacroInfo *MacroInfo, unsigned Argument)
Definition: SemaCodeComplete.cpp:9835
clang::ConstraintSatisfaction
The result of a constraint satisfaction check, containing the necessary information to diagnose an un...
Definition: ASTConcept.h:28
clang::Sema::MarkDeclarationsReferencedInExpr
void MarkDeclarationsReferencedInExpr(Expr *E, bool SkipLocalVariables=false, ArrayRef< const Expr * > StopAt=None)
Mark any declarations that appear within this expression or any potentially-evaluated subexpressions ...
Definition: SemaExpr.cpp:19387
clang::Sema::LOLR_Raw
@ LOLR_Raw
The lookup found a single 'raw' literal operator, which expects a string literal containing the spell...
Definition: Sema.h:4390
clang::Sema::checkAllowedSYCLInitializer
bool checkAllowedSYCLInitializer(VarDecl *VD)
Definition: SemaSYCL.cpp:4165
clang::Sema::ActOnMSAsmStmt
StmtResult ActOnMSAsmStmt(SourceLocation AsmLoc, SourceLocation LBraceLoc, ArrayRef< Token > AsmToks, StringRef AsmString, unsigned NumOutputs, unsigned NumInputs, ArrayRef< StringRef > Constraints, ArrayRef< StringRef > Clobbers, ArrayRef< Expr * > Exprs, SourceLocation EndLoc)
Definition: SemaStmtAsm.cpp:924
clang::Sema::PCC_LocalDeclarationSpecifiers
@ PCC_LocalDeclarationSpecifiers
Code completion occurs within a sequence of declaration specifiers within a function,...
Definition: Sema.h:12997
clang::Sema::ObjCArgInfo::DeclSpec
ObjCDeclSpec DeclSpec
Definition: Sema.h:10169
clang::Sema::DAR_FailedAlreadyDiagnosed
@ DAR_FailedAlreadyDiagnosed
Definition: Sema.h:8954
clang::Sema::UPPC_FixedUnderlyingType
@ UPPC_FixedUnderlyingType
The fixed underlying type of an enumeration.
Definition: Sema.h:8459
clang::Sema::ActOnOpenMPSimdlenClause
OMPClause * ActOnOpenMPSimdlenClause(Expr *Length, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'simdlen' clause.
Definition: SemaOpenMP.cpp:15756
clang::Sema::SetLateTemplateParser
void SetLateTemplateParser(LateTemplateParserCB *LTP, LateTemplateParserCleanupCB *LTPCleanup, void *P)
Definition: Sema.h:1085
clang::Sema::DAR_Succeeded
@ DAR_Succeeded
Definition: Sema.h:8952
clang::Sema::CheckFriendTypeDecl
FriendDecl * CheckFriendTypeDecl(SourceLocation LocStart, SourceLocation FriendLoc, TypeSourceInfo *TSInfo)
Perform semantic analysis of the given friend type declaration.
Definition: SemaDeclCXX.cpp:16641
clang::Sema::POAK_Mac68k
@ POAK_Mac68k
Definition: Sema.h:10356
clang::InClassInitStyle
InClassInitStyle
In-class initialization styles for non-static data members.
Definition: Specifiers.h:256
clang::Sema::CheckBaseSpecifier
CXXBaseSpecifier * CheckBaseSpecifier(CXXRecordDecl *Class, SourceRange SpecifierRange, bool Virtual, AccessSpecifier Access, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
ActOnBaseSpecifier - Parsed a base specifier.
Definition: SemaDeclCXX.cpp:2493
clang::Sema::ContextualImplicitConverter::diagnoseIncomplete
virtual SemaDiagnosticBuilder diagnoseIncomplete(Sema &S, SourceLocation Loc, QualType T)=0
Emits a diagnostic when the expression has incomplete class type.
clang::Sema::isUnexpandedParameterPackPermitted
bool isUnexpandedParameterPackPermitted()
Determine whether an unexpanded parameter pack might be permitted in this location.
Definition: SemaTemplateVariadic.cpp:280
clang::Sema::NoteDeletedInheritingConstructor
void NoteDeletedInheritingConstructor(CXXConstructorDecl *CD)
Definition: SemaDeclCXX.cpp:13605
clang::Sema::MissingImportKind::Definition
@ Definition
clang::Sema::ActOnOMPArrayShapingExpr
ExprResult ActOnOMPArrayShapingExpr(Expr *Base, SourceLocation LParenLoc, SourceLocation RParenLoc, ArrayRef< Expr * > Dims, ArrayRef< SourceRange > Brackets)
Definition: SemaExpr.cpp:5310
clang::Sema::ProduceConstructorSignatureHelp
QualType ProduceConstructorSignatureHelp(QualType Type, SourceLocation Loc, ArrayRef< Expr * > Args, SourceLocation OpenParLoc, bool Braced)
Definition: SemaCodeComplete.cpp:6164
clang::Sema::IsInsideALocalClassWithinATemplateFunction
bool IsInsideALocalClassWithinATemplateFunction()
Definition: SemaTemplate.cpp:10966
clang::Sema::ActOnCXXMemberDeclarator
NamedDecl * ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle)
ActOnCXXMemberDeclarator - This is invoked when a C++ class member declarator is parsed.
Definition: SemaDeclCXX.cpp:3273
clang::OpenMPDirectiveKind
llvm::omp::Directive OpenMPDirectiveKind
OpenMP directives.
Definition: OpenMPKinds.h:24
clang::Sema::checkUnknownAnyCast
ExprResult checkUnknownAnyCast(SourceRange TypeRange, QualType CastType, Expr *CastExpr, CastKind &CastKind, ExprValueKind &VK, CXXCastPath &Path)
Check a cast of an unknown-any type.
Definition: SemaExpr.cpp:20098
clang::Sema::popObjCTypeParamList
void popObjCTypeParamList(Scope *S, ObjCTypeParamList *typeParamList)
Definition: SemaDeclObjC.cpp:805
clang::Sema::UPPC_DeclarationQualifier
@ UPPC_DeclarationQualifier
A declaration qualifier.
Definition: Sema.h:8471
clang::Sema::RequireCompleteEnumDecl
bool RequireCompleteEnumDecl(EnumDecl *D, SourceLocation L, CXXScopeSpec *SS=nullptr)
Require that the EnumDecl is completed with its enumerators defined or instantiated.
Definition: SemaCXXScopeSpec.cpp:241
clang::Sema::ACK_Comparison
@ ACK_Comparison
A comparison.
Definition: Sema.h:12090
clang::Sema::ARCConversionResult
ARCConversionResult
Definition: Sema.h:12467
clang::Sema::DiagnoseUnusedParameters
void DiagnoseUnusedParameters(ArrayRef< ParmVarDecl * > Parameters)
Diagnose any unused parameters in the given sequence of ParmVarDecl pointers.
Definition: SemaDecl.cpp:14072
clang::Sema::buildCoroutinePromise
VarDecl * buildCoroutinePromise(SourceLocation Loc)
Definition: SemaCoroutine.cpp:503
clang::Sema::LookupObjCImplicitSelfParam
@ LookupObjCImplicitSelfParam
Look up implicit 'self' parameter of an objective-c method.
Definition: Sema.h:4344
clang::Sema::CodeCompleteBracketDeclarator
void CodeCompleteBracketDeclarator(Scope *S)
Definition: SemaCodeComplete.cpp:5834
clang::Sema::DeclClonePragmaWeak
NamedDecl * DeclClonePragmaWeak(NamedDecl *ND, const IdentifierInfo *II, SourceLocation Loc)
clang::Sema::checkSectionName
bool checkSectionName(SourceLocation LiteralLoc, StringRef Str)
clang::Sema::NTCUK_Copy
@ NTCUK_Copy
Definition: Sema.h:3119
clang::Sema::PragmaAttributeGroup
A push'd group of PragmaAttributeEntries.
Definition: Sema.h:916
clang::Sema::ShouldWarnIfUnusedFileScopedDecl
bool ShouldWarnIfUnusedFileScopedDecl(const DeclaratorDecl *D) const
Definition: SemaDecl.cpp:1766
clang::Sema::AddSYCLIntelLoopFuseAttr
void AddSYCLIntelLoopFuseAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::PragmaAlignPackDiagnoseKind
PragmaAlignPackDiagnoseKind
Definition: Sema.h:10373
clang::Sema::ActOnPragmaMSPointersToMembers
void ActOnPragmaMSPointersToMembers(LangOptions::PragmaMSPointersToMembersKind Kind, SourceLocation PragmaLoc)
ActOnPragmaMSPointersToMembers - called on well formed #pragma pointers_to_members(representation met...
Definition: SemaAttr.cpp:565
clang::CanonicalDeclPtr
A wrapper class around a pointer that always points to its canonical declaration.
Definition: Redeclarable.h:349
clang::Sema::LocalEagerInstantiationScope::~LocalEagerInstantiationScope
~LocalEagerInstantiationScope()
Definition: Sema.h:9684
clang::Sema::diagnoseMissingTemplateArguments
void diagnoseMissingTemplateArguments(TemplateName Name, SourceLocation Loc)
Definition: SemaTemplate.cpp:4671
clang::Sema::ActOnAbortSEHFinallyBlock
void ActOnAbortSEHFinallyBlock()
Definition: SemaStmt.cpp:4601
clang::Sema::getOrCreateStdNamespace
NamespaceDecl * getOrCreateStdNamespace()
Retrieve the special "std" namespace, which may require us to implicitly define the namespace.
Definition: SemaDeclCXX.cpp:11445
clang::Sema::ExpressionEvaluationContextRecord::InImmediateFunctionContext
bool InImmediateFunctionContext
Definition: Sema.h:1489
clang::Sema::DefaultedFunctionKind::asComparison
DefaultedComparisonKind asComparison() const
Definition: Sema.h:3473
clang::Sema::ActOnOpenMPTaskReductionClause
OMPClause * ActOnOpenMPTaskReductionClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ColonLoc, SourceLocation EndLoc, CXXScopeSpec &ReductionIdScopeSpec, const DeclarationNameInfo &ReductionId, ArrayRef< Expr * > UnresolvedReductions=llvm::None)
Called on well-formed 'task_reduction' clause.
Definition: SemaOpenMP.cpp:18962
clang::Expr::Classification
The return type of classify().
Definition: Expr.h:323
clang::CharUnits
CharUnits - This is an opaque type for sizes expressed in character units.
Definition: CharUnits.h:38
clang::Sema::getDarwinSDKInfoForAvailabilityChecking
DarwinSDKInfo * getDarwinSDKInfoForAvailabilityChecking()
Definition: Sema.cpp:72
clang::Sema::setFunctionHasBranchIntoScope
void setFunctionHasBranchIntoScope()
Definition: Sema.cpp:2342
clang::Sema::CurrentSEHFinally
SmallVector< Scope *, 2 > CurrentSEHFinally
Stack of active SEH __finally scopes. Can be empty.
Definition: Sema.h:616
clang::Sema::AllowFold
@ AllowFold
Definition: Sema.h:12644
clang::Sema::LookupSpecialMember
SpecialMemberOverloadResult LookupSpecialMember(CXXRecordDecl *D, CXXSpecialMember SM, bool ConstArg, bool VolatileArg, bool RValueThis, bool ConstThis, bool VolatileThis)
Definition: SemaLookup.cpp:3128
clang::Sema::isImplicitlyDeleted
bool isImplicitlyDeleted(FunctionDecl *FD)
Determine whether the given function is an implicitly-deleted special member function.
Definition: SemaDeclCXX.cpp:15307
clang::Sema::DiagnoseUnusedDecl
void DiagnoseUnusedDecl(const NamedDecl *ND)
DiagnoseUnusedDecl - Emit warnings about declarations that are not used unless they are marked attr(u...
Definition: SemaDecl.cpp:1975
clang::Sema::isValidSectionSpecifier
llvm::Error isValidSectionSpecifier(StringRef Str)
clang::Sema::MarkDeclarationsReferencedInType
void MarkDeclarationsReferencedInType(SourceLocation Loc, QualType T)
Mark all of the declarations referenced within a particular AST node as referenced.
Definition: SemaExpr.cpp:19332
clang::Sema::StdExperimentalNamespaceCache
NamespaceDecl * StdExperimentalNamespaceCache
The C++ "std::experimental" namespace, where the experimental parts of the standard library resides.
Definition: Sema.h:1304
clang::Sema::inheritCUDATargetAttrs
void inheritCUDATargetAttrs(FunctionDecl *FD, const FunctionTemplateDecl &TD)
Copies target attributes from the template TD to the function FD.
Definition: SemaCUDA.cpp:945
clang::Sema::MarkVariableReferenced
void MarkVariableReferenced(SourceLocation Loc, VarDecl *Var)
Mark a variable referenced, and check whether it is odr-used (C++ [basic.def.odr]p2,...
Definition: SemaExpr.cpp:19186
clang::Sema::CXXSpecialMember
CXXSpecialMember
Kinds of C++ special members.
Definition: Sema.h:1669
clang::Sema::getNumArgumentsInExpansion
Optional< unsigned > getNumArgumentsInExpansion(QualType T, const MultiLevelTemplateArgumentList &TemplateArgs)
Determine the number of arguments in the given pack expansion type.
Definition: SemaTemplateVariadic.cpp:805
clang::Sema::checkAndRewriteMustTailAttr
bool checkAndRewriteMustTailAttr(Stmt *St, const Attr &MTA)
Check whether the given statement can have musttail applied to it, issuing a diagnostic and returning...
Definition: SemaStmt.cpp:602
clang::Sema::CheckVariableDeclaration
bool CheckVariableDeclaration(VarDecl *NewVD, LookupResult &Previous)
Perform semantic checking on a newly-created variable declaration.
Definition: SemaDecl.cpp:8393
clang::Sema::DeclareTargetContextInfo::MapInfo
Definition: Sema.h:10773
clang::Sema::mergeFormatAttr
FormatAttr * mergeFormatAttr(Decl *D, const AttributeCommonInfo &CI, IdentifierInfo *Format, int FormatIdx, int FirstArg)
clang::Sema::ActOnOpenMPDeclareReductionCombinerEnd
void ActOnOpenMPDeclareReductionCombinerEnd(Decl *D, Expr *Combiner)
Finish current declare reduction construct initializer.
Definition: SemaOpenMP.cpp:21334
clang::Sema::DiagnoseUnsatisfiedConstraint
void DiagnoseUnsatisfiedConstraint(const ConstraintSatisfaction &Satisfaction, bool First=true)
Emit diagnostics explaining why a constraint expression was deemed unsatisfied.
Definition: SemaConcept.cpp:688
clang::Sema::getNonOdrUseReasonInCurrentContext
NonOdrUseReason getNonOdrUseReasonInCurrentContext(ValueDecl *D)
If D cannot be odr-used in the current expression evaluation context, return a reason explaining why.
Definition: SemaExpr.cpp:2058
clang::Sema::TPL_TemplateMatch
@ TPL_TemplateMatch
We are matching the template parameter lists of two templates that might be redeclarations.
Definition: Sema.h:8275
clang::Sema::PragmaClangDataSection
PragmaClangSection PragmaClangDataSection
Definition: Sema.h:649
clang::Sema::CheckEnumConstant
EnumConstantDecl * CheckEnumConstant(EnumDecl *Enum, EnumConstantDecl *LastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, Expr *val)
Definition: SemaDecl.cpp:18059
clang::Sema::BuildBaseInitializer
MemInitResult BuildBaseInitializer(QualType BaseType, TypeSourceInfo *BaseTInfo, Expr *Init, CXXRecordDecl *ClassDecl, SourceLocation EllipsisLoc)
Definition: SemaDeclCXX.cpp:4544
clang::Sema::ActOnTemplateTypeArgument
ParsedTemplateArgument ActOnTemplateTypeArgument(TypeResult ParsedType)
Convert a parsed type into a parsed template argument.
Definition: SemaTemplate.cpp:973
clang::Sema::AddSYCLIntelFPGAInitiationIntervalAttr
void AddSYCLIntelFPGAInitiationIntervalAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::PragmaMSCommentKind
PragmaMSCommentKind
Definition: PragmaKinds.h:14
clang::Sema::ActOnOpenMPAssumesDirective
void ActOnOpenMPAssumesDirective(SourceLocation Loc, OpenMPDirectiveKind DKind, ArrayRef< std::string > Assumptions, bool SkippedClauses)
Called on well-formed '#pragma omp [begin] assume[s]'.
Definition: SemaOpenMP.cpp:3245
clang::Sema::InstantiateClassTemplateSpecialization
bool InstantiateClassTemplateSpecialization(SourceLocation PointOfInstantiation, ClassTemplateSpecializationDecl *ClassTemplateSpec, TemplateSpecializationKind TSK, bool Complain=true)
Definition: SemaTemplateInstantiate.cpp:3275
clang::Sema::ActOnTemplateIdType
TypeResult ActOnTemplateIdType(Scope *S, CXXScopeSpec &SS, SourceLocation TemplateKWLoc, TemplateTy Template, IdentifierInfo *TemplateII, SourceLocation TemplateIILoc, SourceLocation LAngleLoc, ASTTemplateArgsPtr TemplateArgs, SourceLocation RAngleLoc, bool IsCtorOrDtorName=false, bool IsClassName=false)
Definition: SemaTemplate.cpp:3905
clang::Sema::CheckCompleteDecompositionDeclaration
void CheckCompleteDecompositionDeclaration(DecompositionDecl *DD)
Definition: SemaDeclCXX.cpp:1470
clang::APValue
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Definition: APValue.h:122
clang::Sema::TPC_FriendFunctionTemplateDefinition
@ TPC_FriendFunctionTemplateDefinition
Definition: Sema.h:8004
clang::Sema::ActOnOpenMPTaskDirective
StmtResult ActOnOpenMPTaskDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp task' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10708
clang::Sema::GatherGlobalCodeCompletions
void GatherGlobalCodeCompletions(CodeCompletionAllocator &Allocator, CodeCompletionTUInfo &CCTUInfo, SmallVectorImpl< CodeCompletionResult > &Results)
Definition: SemaCodeComplete.cpp:10013
clang::Sema::isAbstractType
bool isAbstractType(SourceLocation Loc, QualType T)
Definition: SemaDeclCXX.cpp:5772
clang::Sema::CodeCompleteObjCPropertyDefinition
void CodeCompleteObjCPropertyDefinition(Scope *S)
Definition: SemaCodeComplete.cpp:8483
clang::Sema::DeferDiagsRAII::DeferDiagsRAII
DeferDiagsRAII(Sema &S, bool DeferDiags)
Definition: Sema.h:2072
clang::Sema::LookupOrdinaryName
@ LookupOrdinaryName
Ordinary name lookup, which finds ordinary names (functions, variables, typedefs, etc....
Definition: Sema.h:4305
clang::Sema::UPPC_DefaultArgument
@ UPPC_DefaultArgument
A default argument.
Definition: Sema.h:8477
clang::Sema::AlignPackIncludeState
Definition: Sema.h:860
clang::Sema::MergeSYCLIntelNumSimdWorkItemsAttr
SYCLIntelNumSimdWorkItemsAttr * MergeSYCLIntelNumSimdWorkItemsAttr(Decl *D, const SYCLIntelNumSimdWorkItemsAttr &A)
clang::TNK_Concept_template
@ TNK_Concept_template
The name refers to a concept.
Definition: TemplateKinds.h:52
clang::Sema::ActOnOpenMPDeclareSimdDirective
DeclGroupPtrTy ActOnOpenMPDeclareSimdDirective(DeclGroupPtrTy DG, OMPDeclareSimdDeclAttr::BranchStateTy BS, Expr *Simdlen, ArrayRef< Expr * > Uniforms, ArrayRef< Expr * > Aligneds, ArrayRef< Expr * > Alignments, ArrayRef< Expr * > Linears, ArrayRef< unsigned > LinModifiers, ArrayRef< Expr * > Steps, SourceRange SR)
Called on well-formed '#pragma omp declare simd' after parsing of the associated method/function.
Definition: SemaOpenMP.cpp:6508
clang::Sema::CXXCopyAssignment
@ CXXCopyAssignment
Definition: Sema.h:1673
clang::Sema::BuildSYCLUniqueStableNameExpr
ExprResult BuildSYCLUniqueStableNameExpr(SourceLocation OpLoc, SourceLocation LParen, SourceLocation RParen, TypeSourceInfo *TSI)
Definition: SemaExpr.cpp:3583
clang::Sema::NTCUC_CompoundLiteral
@ NTCUC_CompoundLiteral
Definition: Sema.h:3102
clang::Sema::IncompatibleNestedPointerQualifiers
@ IncompatibleNestedPointerQualifiers
IncompatibleNestedPointerQualifiers - The assignment is between two nested pointer types,...
Definition: Sema.h:12160
clang::Sema::NSNumberLiteralMethods
ObjCMethodDecl * NSNumberLiteralMethods[NSAPI::NumNSNumberLiteralMethods]
The Objective-C NSNumber methods used to create NSNumber literals.
Definition: Sema.h:1340
clang::Sema::BuildUsingEnumDeclaration
NamedDecl * BuildUsingEnumDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, SourceLocation EnumLoc, SourceLocation NameLoc, EnumDecl *ED)
Definition: SemaDeclCXX.cpp:12538
clang::Sema::TDK_TooFewArguments
@ TDK_TooFewArguments
When performing template argument deduction for a function template, there were too few call argument...
Definition: Sema.h:8847
clang::Sema::CheckTollFreeBridgeCast
void CheckTollFreeBridgeCast(QualType castType, Expr *castExpr)
Definition: SemaExprObjC.cpp:4137
clang::Sema::BuildParmVarDeclForTypedef
ParmVarDecl * BuildParmVarDeclForTypedef(DeclContext *DC, SourceLocation Loc, QualType T)
Synthesizes a variable for a parameter arising from a typedef.
Definition: SemaDecl.cpp:14059
clang::Sema::updateOutOfDateSelector
void updateOutOfDateSelector(Selector Sel)
Definition: SemaDeclObjC.cpp:3414
clang::Sema::PSK_Pop_Set
@ PSK_Pop_Set
Definition: Sema.h:661
clang::Sema::ImplicitExceptionSpecification
Helper class that collects exception specifications for implicitly-declared special member functions.
Definition: Sema.h:6234
llvm::SmallVectorImpl
Definition: LLVM.h:39
clang::Sema::CheckCompletedCoroutineBody
void CheckCompletedCoroutineBody(FunctionDecl *FD, Stmt *&Body)
Definition: SemaCoroutine.cpp:1066
clang::Sema::ActOnFinishObjCImplementation
DeclGroupPtrTy ActOnFinishObjCImplementation(Decl *ObjCImpDecl, ArrayRef< Decl * > Decls)
Definition: SemaDeclObjC.cpp:2097
clang::Sema::getOpenMPCaptureLevels
static int getOpenMPCaptureLevels(OpenMPDirectiveKind Kind)
Return the number of captured regions created for an OpenMP directive.
Definition: SemaOpenMP.cpp:4377
clang::Sema::getFunctionScopes
ArrayRef< sema::FunctionScopeInfo * > getFunctionScopes() const
Definition: Sema.h:967
clang::Sema::ActOnOpenMPUntiedClause
OMPClause * ActOnOpenMPUntiedClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'untied' clause.
Definition: SemaOpenMP.cpp:16553
clang::Sema::areVectorTypesSameSize
bool areVectorTypesSameSize(QualType srcType, QualType destType)
Definition: SemaExpr.cpp:7716
clang::Sema::CallingConventionIgnoredReason::ConstructorDestructor
@ ConstructorDestructor
clang::Sema::DefineImplicitLambdaToFunctionPointerConversion
void DefineImplicitLambdaToFunctionPointerConversion(SourceLocation CurrentLoc, CXXConversionDecl *Conv)
Define the "body" of the conversion from a lambda object to a function pointer.
Definition: SemaDeclCXX.cpp:15311
clang::Sema::CheckForImmediateInvocation
ExprResult CheckForImmediateInvocation(ExprResult E, FunctionDecl *Decl)
Wrap the expression in a ConstantExpr if it is a potential immediate invocation.
Definition: SemaExpr.cpp:17116
clang::Sema::GlobalMethodPool::Lists
std::pair< ObjCMethodList, ObjCMethodList > Lists
Definition: Sema.h:1636
clang::Sema::AddRangeBasedOptnone
void AddRangeBasedOptnone(FunctionDecl *FD)
Only called on function definitions; if there is a pragma in scope with the effect of a range-based o...
Definition: SemaAttr.cpp:1062
clang::Sema::CheckTemplateArgumentKind
CheckTemplateArgumentKind
Specifies the context in which a particular template argument is being checked.
Definition: Sema.h:8184
clang::EST_NoexceptFalse
@ EST_NoexceptFalse
noexcept(expression), evals to 'false'
Definition: ExceptionSpecificationType.h:28
clang::Sema::FindInstantiatedContext
DeclContext * FindInstantiatedContext(SourceLocation Loc, DeclContext *DC, const MultiLevelTemplateArgumentList &TemplateArgs)
Finds the instantiation of the given declaration context within the current instantiation.
Definition: SemaTemplateInstantiateDecl.cpp:6346
clang::Sema::SubstTypeConstraint
bool SubstTypeConstraint(TemplateTypeParmDecl *Inst, const TypeConstraint *TC, const MultiLevelTemplateArgumentList &TemplateArgs)
Definition: SemaTemplateInstantiate.cpp:2390
clang::Sema::HandleDeclarator
NamedDecl * HandleDeclarator(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParameterLists)
Definition: SemaDecl.cpp:5939
clang::Sema::ExtParameterInfoBuilder::getPointerOrNull
const FunctionProtoType::ExtParameterInfo * getPointerOrNull(unsigned numParams)
Return a pointer (suitable for setting in an ExtProtoInfo) to the ExtParameterInfo array we've built ...
Definition: Sema.h:9717
clang::Sema::NTK_NonEnum
@ NTK_NonEnum
Definition: Sema.h:3359
clang::ValueDecl::getType
QualType getType() const
Definition: Decl.h:686
clang::Sema::CVT_Host
@ CVT_Host
Emitted on device side with a shadow variable on host side.
Definition: Sema.h:12819
clang::Sema::CheckCompatibleReinterpretCast
void CheckCompatibleReinterpretCast(QualType SrcType, QualType DestType, bool IsDereference, SourceRange Range)
Definition: SemaCast.cpp:1988
clang::Sema::ActOnCompoundStmt
StmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R, ArrayRef< Stmt * > Elts, bool isStmtExpr)
Definition: SemaStmt.cpp:409
true
#define true
Definition: stdbool.h:21
clang::Sema::ActOnOpenMPDeviceClause
OMPClause * ActOnOpenMPDeviceClause(OpenMPDeviceClauseModifier Modifier, Expr *Device, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation ModifierLoc, SourceLocation EndLoc)
Called on well-formed 'device' clause.
Definition: SemaOpenMP.cpp:19889
clang::CastKind
CastKind
CastKind - The kind of operation required for a conversion.
Definition: OperationKinds.h:20
clang::Sema::ActOnOpenMPParallelMasterTaskLoopSimdDirective
StmtResult ActOnOpenMPParallelMasterTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel master taskloop simd' after parsing of the associated sta...
Definition: SemaOpenMP.cpp:13155
clang::Sema::referenceDLLExportedClassMethods
void referenceDLLExportedClassMethods()
Definition: SemaDeclCXX.cpp:13855
clang::Sema::ActOnOpenMPAtomicDefaultMemOrderClause
OMPClause * ActOnOpenMPAtomicDefaultMemOrderClause(OpenMPAtomicDefaultMemOrderClauseKind Kind, SourceLocation KindLoc, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'atomic_default_mem_order' clause.
Definition: SemaOpenMP.cpp:16066
clang::Sema::LK_Numeric
@ LK_Numeric
Definition: Sema.h:3966
clang::Sema::TUK_Friend
@ TUK_Friend
Definition: Sema.h:3380
clang::Sema::BuildBuiltinCallExpr
Expr * BuildBuiltinCallExpr(SourceLocation Loc, Builtin::ID Id, MultiExprArg CallArgs)
BuildBuiltinCallExpr - Create a call to a builtin function specified by Id.
Definition: SemaExpr.cpp:6863
TemplateKinds.h
clang::VarTemplateDecl
Declaration of a variable template.
Definition: DeclTemplate.h:3079
clang::Sema::getPrintingPolicy
PrintingPolicy getPrintingPolicy() const
Retrieve a suitable printing policy for diagnostics.
Definition: Sema.h:3326
clang::Sema::ActOnFinishExportDecl
Decl * ActOnFinishExportDecl(Scope *S, Decl *ExportDecl, SourceLocation RBraceLoc)
Complete the definition of an export declaration.
Definition: SemaModule.cpp:854
clang::Sema::forceUnknownAnyToType
ExprResult forceUnknownAnyToType(Expr *E, QualType ToType)
Force an expression with unknown-type to an expression of the given type.
Definition: SemaExpr.cpp:20118
clang::Sema::AbstractSynthesizedIvarType
@ AbstractSynthesizedIvarType
Definition: Sema.h:7806
clang::Sema::ActOnCaseExpr
ExprResult ActOnCaseExpr(SourceLocation CaseLoc, ExprResult Val)
Definition: SemaStmt.cpp:449
llvm::SmallSetVector< NamedDecl *, 16 >
clang::Sema::DecomposeUnqualifiedId
void DecomposeUnqualifiedId(const UnqualifiedId &Id, TemplateArgumentListInfo &Buffer, DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *&TemplateArgs)
Decomposes the given name into a DeclarationNameInfo, its location, and possibly a list of template a...
Definition: SemaExpr.cpp:2156
clang::Sema::ActOnOpenMPTargetDataDirective
StmtResult ActOnOpenMPTargetDataDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp target data' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12698
clang::Sema::ActOnCXXCatchBlock
StmtResult ActOnCXXCatchBlock(SourceLocation CatchLoc, Decl *ExDecl, Stmt *HandlerBlock)
ActOnCXXCatchBlock - Takes an exception declaration and a handler block and creates a proper catch ha...
Definition: SemaStmt.cpp:4324
clang::Sema::CodeCompleteConstructorInitializer
void CodeCompleteConstructorInitializer(Decl *Constructor, ArrayRef< CXXCtorInitializer * > Initializers)
Definition: SemaCodeComplete.cpp:6694
clang::Sema::ActOnPredefinedExpr
ExprResult ActOnPredefinedExpr(SourceLocation Loc, tok::TokenKind Kind)
Definition: SemaExpr.cpp:3642
clang::Sema::OMPIteratorData::ColonLoc
SourceLocation ColonLoc
Definition: Sema.h:5724
clang::Sema::CheckRegparmAttr
bool CheckRegparmAttr(const ParsedAttr &attr, unsigned &value)
clang::Sema::ActOnProperty
Decl * ActOnProperty(Scope *S, SourceLocation AtLoc, SourceLocation LParenLoc, FieldDeclarator &FD, ObjCDeclSpec &ODS, Selector GetterSel, Selector SetterSel, tok::ObjCKeywordKind MethodImplKind, DeclContext *lexicalDC=nullptr)
Definition: SemaObjCProperty.cpp:172
clang::Sema::ExpressionEvaluationContextRecord::EK_Other
@ EK_Other
Definition: Sema.h:1483
clang::Sema::ParsingInitForAutoVars
llvm::SmallPtrSet< const Decl *, 4 > ParsingInitForAutoVars
ParsingInitForAutoVars - a set of declarations with auto types for which we are currently parsing the...
Definition: Sema.h:1028
Previous
StateNode * Previous
Definition: UnwrappedLineFormatter.cpp:1085
clang::Sema::MSVCGuidDecl
RecordDecl * MSVCGuidDecl
The MSVC "_GUID" struct, which is defined in MSVC header files.
Definition: Sema.h:1322
clang::Sema::AddSYCLIntelMaxWorkGroupSizeAttr
void AddSYCLIntelMaxWorkGroupSizeAttr(Decl *D, const AttributeCommonInfo &CI, Expr *XDim, Expr *YDim, Expr *ZDim)
clang::Sema::PragmaAttributeCurrentTargetDecl
const Decl * PragmaAttributeCurrentTargetDecl
The declaration that is currently receiving an attribute from the #pragma attribute stack.
Definition: Sema.h:928
clang::SYCLIntegrationHeader::endKernel
void endKernel()
Signals that addition of parameter descriptors to current kernel invocation descriptor has finished.
Definition: SemaSYCL.cpp:4839
clang::ParsedAttributesView
Definition: ParsedAttr.h:909
clang::Expr
This represents one expression.
Definition: Expr.h:109
clang::BaseUsingDecl
Represents a C++ declaration that introduces decls from somewhere else.
Definition: DeclCXX.h:3304
clang::Sema::ActOnAccessSpecifier
bool ActOnAccessSpecifier(AccessSpecifier Access, SourceLocation ASLoc, SourceLocation ColonLoc, const ParsedAttributesView &Attrs)
ActOnAccessSpecifier - Parsed an access specifier followed by a colon.
Definition: SemaDeclCXX.cpp:3048
clang::Sema::FindAssociatedClassesAndNamespaces
void FindAssociatedClassesAndNamespaces(SourceLocation InstantiationLoc, ArrayRef< Expr * > Args, AssociatedNamespaceSet &AssociatedNamespaces, AssociatedClassSet &AssociatedClasses)
Find the associated classes and namespaces for argument-dependent lookup for a call with the given se...
Definition: SemaLookup.cpp:3049
clang::Sema::CFT_InvalidTarget
@ CFT_InvalidTarget
Definition: Sema.h:12805
clang::OpenMPScheduleClauseKind
OpenMPScheduleClauseKind
OpenMP attributes for 'schedule' clause.
Definition: OpenMPKinds.h:30
clang::Sema::getCurrentMangleNumberContext
std::tuple< MangleNumberingContext *, Decl * > getCurrentMangleNumberContext(const DeclContext *DC)
Compute the mangling number context for a lambda expression or block literal.
Definition: SemaLambda.cpp:274
clang::Preprocessor
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
Definition: Preprocessor.h:130
clang::Sema::NameClassification::NonTypeDecl
NamedDecl * NonTypeDecl
Definition: Sema.h:2766
clang::Sema::ActOnOpenMPDeclareReductionInitializerStart
VarDecl * ActOnOpenMPDeclareReductionInitializerStart(Scope *S, Decl *D)
Initialize declare reduction construct initializer.
Definition: SemaOpenMP.cpp:21348
clang::Sema::ActOnOpenMPGrainsizeClause
OMPClause * ActOnOpenMPGrainsizeClause(Expr *Size, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'grainsize' clause.
Definition: SemaOpenMP.cpp:21656
clang::Sema::CheckFunctionOrTemplateParamDeclarator
void CheckFunctionOrTemplateParamDeclarator(Scope *S, Declarator &D)
Common checks for a parameter-declaration that should apply to both function parameters and non-type ...
Definition: SemaDecl.cpp:13913
clang::ASTDeclReader
Definition: ASTReaderDecl.cpp:80
clang::Sema::GlobalMethodPool::iterator
llvm::DenseMap< Selector, Lists >::iterator iterator
Definition: Sema.h:1637
clang::Sema::CodeSynthesisContext::Entity
Decl * Entity
The entity that is being synthesized.
Definition: Sema.h:9152
clang::Sema::SimplerImplicitMoveMode::ForceOn
@ ForceOn
SM
#define SM(sm)
Definition: Cuda.cpp:81
clang::Sema::VerifyICEDiagnoser::VerifyICEDiagnoser
VerifyICEDiagnoser(bool Suppress=false)
Definition: Sema.h:12632
clang::ConstructorUsingShadowDecl
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Definition: DeclCXX.h:3485
clang::Sema::SkipBodyInfo::Previous
NamedDecl * Previous
Definition: Sema.h:2686
clang::ExternalSemaSource::ReadTentativeDefinitions
virtual void ReadTentativeDefinitions(SmallVectorImpl< VarDecl * > &TentativeDefs)
Read the set of tentative definitions known to the external Sema source.
Definition: ExternalSemaSource.h:105
clang::Sema::checkSYCLDeviceFunction
bool checkSYCLDeviceFunction(SourceLocation Loc, FunctionDecl *Callee)
Check whether we're allowed to call Callee from the current context.
Definition: SemaSYCL.cpp:4014
clang::Sema::AlignPackInfo::IsPackAttr
bool IsPackAttr() const
Definition: Sema.h:716
clang::Sema::DiagnoseUnusedBackingIvarInAccessor
void DiagnoseUnusedBackingIvarInAccessor(Scope *S, const ObjCImplementationDecl *ImplD)
DiagnoseUnusedBackingIvarInAccessor - Issue an 'unused' warning if ivar which backs the property is n...
Definition: SemaDeclObjC.cpp:5322
clang::Sema::AddSYCLIntelNumSimdWorkItemsAttr
void AddSYCLIntelNumSimdWorkItemsAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::HandleMSProperty
MSPropertyDecl * HandleMSProperty(Scope *S, RecordDecl *TagD, SourceLocation DeclStart, Declarator &D, Expr *BitfieldWidth, InClassInitStyle InitStyle, AccessSpecifier AS, const ParsedAttr &MSPropertyAttr)
HandleMSProperty - Analyze a __delcspec(property) field of a C++ class.
Definition: SemaDeclCXX.cpp:18252
clang::Sema::NameClassification::Error
static NameClassification Error()
Definition: Sema.h:2778
clang::concepts::ExprRequirement
A requires-expression requirement which queries the validity and properties of an expression ('simple...
Definition: ExprConcepts.h:258
clang::Sema::AddOverloadedCallCandidates
void AddOverloadedCallCandidates(UnresolvedLookupExpr *ULE, ArrayRef< Expr * > Args, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
Add the overload candidates named by callee and/or found by argument dependent lookup to the given ov...
Definition: SemaOverload.cpp:12735
clang::Sema::buildLambdaInitCaptureInitialization
QualType buildLambdaInitCaptureInitialization(SourceLocation Loc, bool ByRef, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions, IdentifierInfo *Id, bool DirectInit, Expr *&Init)
Definition: SemaLambda.cpp:790
clang::Sema::BuildCXXThrow
ExprResult BuildCXXThrow(SourceLocation OpLoc, Expr *Ex, bool IsThrownVarInScope)
Definition: SemaExprCXX.cpp:856
clang::Sema::NestedNameSpecInfo
Keeps information about an identifier in a nested-name-spec.
Definition: Sema.h:6879
clang::Sema::SetDelegatingInitializer
bool SetDelegatingInitializer(CXXConstructorDecl *Constructor, CXXCtorInitializer *Initializer)
Definition: SemaDeclCXX.cpp:5124
clang::Sema::PCSK_Rodata
@ PCSK_Rodata
Definition: Sema.h:632
clang::Sema::AddAlignmentAttributesForRecord
void AddAlignmentAttributesForRecord(RecordDecl *RD)
AddAlignmentAttributesForRecord - Adds any needed alignment attributes to a the record decl,...
Definition: SemaAttr.cpp:50
clang::Sema::isCurrentClassName
bool isCurrentClassName(const IdentifierInfo &II, Scope *S, const CXXScopeSpec *SS=nullptr)
isCurrentClassName - Determine whether the identifier II is the name of the class type currently bein...
Definition: SemaDeclCXX.cpp:2424
clang::Sema::LookupOMPReductionName
@ LookupOMPReductionName
Look up the name of an OpenMP user-defined reduction operation.
Definition: Sema.h:4346
clang::CXXCtorInitializer
Represents a C++ base or member initializer.
Definition: DeclCXX.h:2192
clang::Sema::AP_PragmaClangAttribute
@ AP_PragmaClangAttribute
The availability attribute was applied using '#pragma clang attribute'.
Definition: Sema.h:3671
clang::Sema::isStdInitializerList
bool isStdInitializerList(QualType Ty, QualType *Element)
Tests whether Ty is an instance of std::initializer_list and, if it is and Element is not NULL,...
Definition: SemaDeclCXX.cpp:11460
clang::CleanupInfo
Definition: CleanupInfo.h:19
clang::Sema::BuildResolvedCallExpr
ExprResult BuildResolvedCallExpr(Expr *Fn, NamedDecl *NDecl, SourceLocation LParenLoc, ArrayRef< Expr * > Arg, SourceLocation RParenLoc, Expr *Config=nullptr, bool IsExecConfig=false, ADLCallKind UsesADL=ADLCallKind::NotADL)
BuildResolvedCallExpr - Build a call to a resolved expression, i.e.
Definition: SemaExpr.cpp:6929
clang::Sema::DefineUsedVTables
bool DefineUsedVTables()
Define all of the vtables that have been used in this translation unit and reference any virtual memb...
Definition: SemaDeclCXX.cpp:17757
clang::Sema::DefaultedFunctionKind::asSpecialMember
CXXSpecialMember asSpecialMember() const
Definition: Sema.h:3472
clang::Sema::UPPC_RequiresClause
@ UPPC_RequiresClause
Definition: Sema.h:8507
clang::Sema::getCurrentThisType
QualType getCurrentThisType()
Try to retrieve the type of the 'this' pointer.
Definition: SemaExprCXX.cpp:1190
clang::Sema::SubstExceptionSpec
void SubstExceptionSpec(FunctionDecl *New, const FunctionProtoType *Proto, const MultiLevelTemplateArgumentList &Args)
Definition: SemaTemplateInstantiate.cpp:2288
Availability.h
clang::transformer::name
RangeSelector name(std::string ID)
Given a node with a "name", (like NamedDecl, DeclRefExpr, CxxCtorInitializer, and TypeLoc) selects th...
Definition: RangeSelector.cpp:200
clang::Sema::canSkipFunctionBody
bool canSkipFunctionBody(Decl *D)
Determine whether we can skip parsing the body of a function definition, assuming we don't care about...
Definition: SemaDecl.cpp:14646
clang::Sema::ActOnOpenMPDependClause
OMPClause * ActOnOpenMPDependClause(Expr *DepModifier, OpenMPDependClauseKind DepKind, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'depend' clause.
Definition: SemaOpenMP.cpp:19627
clang::Sema::PragmaClangRodataSection
PragmaClangSection PragmaClangRodataSection
Definition: Sema.h:650
clang::Sema::checkAllowedCUDAInitializer
void checkAllowedCUDAInitializer(VarDecl *VD)
Definition: SemaCUDA.cpp:610
clang::Sema::ActOnNameClassifiedAsNonType
ExprResult ActOnNameClassifiedAsNonType(Scope *S, const CXXScopeSpec &SS, NamedDecl *Found, SourceLocation NameLoc, const Token &NextToken)
Act on the result of classifying a name as a specific non-type declaration.
Definition: SemaDecl.cpp:1244
clang::Sema::OffsetOfComponent::E
Expr * E
Definition: Sema.h:5925
clang::Sema::incrementMSManglingNumber
void incrementMSManglingNumber() const
Definition: Sema.h:13504
clang::Sema::PP
Preprocessor & PP
Definition: Sema.h:586
clang::Sema::CodeCompleteObjCMethodDeclSelector
void CodeCompleteObjCMethodDeclSelector(Scope *S, bool IsInstanceMethod, bool AtParameterName, ParsedType ReturnType, ArrayRef< IdentifierInfo * > SelIdents)
Definition: SemaCodeComplete.cpp:9524
clang::Sema::BuildReferenceType
QualType BuildReferenceType(QualType T, bool LValueRef, SourceLocation Loc, DeclarationName Entity)
Build a reference type.
Definition: SemaType.cpp:2184
clang::Sema::ImplicitExceptionSpecification::size
unsigned size() const
The number of exceptions in the exception specification.
Definition: Sema.h:6267
clang::Sema::BuildObjCEncodeExpression
ExprResult BuildObjCEncodeExpression(SourceLocation AtLoc, TypeSourceInfo *EncodedTypeInfo, SourceLocation RParenLoc)
Definition: SemaExprObjC.cpp:1130
clang::Sema::LOLR_Cooked
@ LOLR_Cooked
The lookup found a single 'cooked' literal operator, which expects a normal literal to be built and p...
Definition: Sema.h:4387
clang::Sema::AlignPackIncludeState::ShouldWarnOnInclude
bool ShouldWarnOnInclude
Definition: Sema.h:863
clang::Sema::ActOnCXXNestedNameSpecifier
bool ActOnCXXNestedNameSpecifier(Scope *S, NestedNameSpecInfo &IdInfo, bool EnteringContext, CXXScopeSpec &SS, bool ErrorRecoveryLookup=false, bool *IsCorrectedToColon=nullptr, bool OnlyNamespace=false)
The parser has parsed a nested-name-specifier 'identifier::'.
Definition: SemaCXXScopeSpec.cpp:851
clang::Sema::NC_VarTemplate
@ NC_VarTemplate
The name was classified as a variable template name.
Definition: Sema.h:2753
clang::Sema::LookupUsingDeclName
@ LookupUsingDeclName
Look up all declarations in a scope with the given name, including resolved using declarations.
Definition: Sema.h:4332
clang::PreferredTypeBuilder::enterMemAccess
void enterMemAccess(Sema &S, SourceLocation Tok, Expr *Base)
Definition: SemaCodeComplete.cpp:564
clang::Sema::CheckUsingShadowDecl
bool CheckUsingShadowDecl(BaseUsingDecl *BUD, NamedDecl *Target, const LookupResult &PreviousDecls, UsingShadowDecl *&PrevShadow)
Determines whether to create a using shadow decl for a particular decl, given the set of decls existi...
Definition: SemaDeclCXX.cpp:11882
clang::Sema::AddAlignedAttr
void AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E, bool IsPackExpansion)
AddAlignedAttr - Adds an aligned attribute to a particular declaration.
clang::Sema::ActOnOMPArraySectionExpr
ExprResult ActOnOMPArraySectionExpr(Expr *Base, SourceLocation LBLoc, Expr *LowerBound, SourceLocation ColonLocFirst, SourceLocation ColonLocSecond, Expr *Length, Expr *Stride, SourceLocation RBLoc)
Definition: SemaExpr.cpp:5124
clang::Sema::NTK_Template
@ NTK_Template
Definition: Sema.h:3362
clang::Sema::EmitCurrentDiagnostic
void EmitCurrentDiagnostic(unsigned DiagID)
Cause the active diagnostic on the DiagosticsEngine to be emitted.
Definition: Sema.cpp:1518
clang::Sema::UPPC_NonTypeTemplateParameterType
@ UPPC_NonTypeTemplateParameterType
The type of a non-type template parameter.
Definition: Sema.h:8480
clang::Sema::AddSYCLIntelESimdVectorizeAttr
void AddSYCLIntelESimdVectorizeAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E)
clang::Sema::DeduceTemplateSpecializationFromInitializer
QualType DeduceTemplateSpecializationFromInitializer(TypeSourceInfo *TInfo, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Init)
Definition: SemaInit.cpp:9977
clang::Sema::NamedReturnInfo::MoveEligible
@ MoveEligible
Definition: Sema.h:5154
clang::IdentifierLoc
Wraps an identifier and optional source location for the identifier.
Definition: ParsedAttr.h:218
clang::Sema::ActOnLambdaExpr
ExprResult ActOnLambdaExpr(SourceLocation StartLoc, Stmt *Body, Scope *CurScope)
ActOnLambdaExpr - This is called when the body of a lambda expression was successfully completed.
Definition: SemaLambda.cpp:1632
clang::Sema::diagnoseArgIndependentDiagnoseIfAttrs
bool diagnoseArgIndependentDiagnoseIfAttrs(const NamedDecl *ND, SourceLocation Loc)
Emit diagnostics for the diagnose_if attributes on Function, ignoring any ArgDependent DiagnoseIfAttr...
Definition: SemaOverload.cpp:6799
clang::Sema::MarkFunctionReferenced
void MarkFunctionReferenced(SourceLocation Loc, FunctionDecl *Func, bool MightBeOdrUse=true)
Mark a function referenced, and check whether it is odr-used (C++ [basic.def.odr]p2,...
Definition: SemaExpr.cpp:17551
clang::Sema::ActOnOpenMPTaskLoopSimdDirective
StmtResult ActOnOpenMPTaskLoopSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp taskloop simd' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12960
clang::Sema::TryCaptureKind
TryCaptureKind
Definition: Sema.h:5399
clang::Sema::CheckPackExpansion
TypeSourceInfo * CheckPackExpansion(TypeSourceInfo *Pattern, SourceLocation EllipsisLoc, Optional< unsigned > NumExpansions)
Construct a pack expansion type from the pattern of the pack expansion.
Definition: SemaTemplateVariadic.cpp:605
clang::DeclarationNameInfo
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
Definition: DeclarationName.h:756
clang::Sema::MergeWorkGroupSizeHintAttr
WorkGroupSizeHintAttr * MergeWorkGroupSizeHintAttr(Decl *D, const WorkGroupSizeHintAttr &A)
clang::ClassTemplateSpecializationDecl
Represents a class template specialization, which refers to a class template with a given set of temp...
Definition: DeclTemplate.h:1803
clang::CastExpr
CastExpr - Base class for type casts, including both implicit casts (ImplicitCastExpr) and explicit c...
Definition: Expr.h:3531
clang::Sema::CheckDelegatingCtorCycles
void CheckDelegatingCtorCycles()
Definition: SemaDeclCXX.cpp:18009
clang::Sema::TypeTagMagicValue
std::pair< const IdentifierInfo *, uint64_t > TypeTagMagicValue
A pair of ArgumentKind identifier and magic value.
Definition: Sema.h:13437
clang::Sema::CheckMemberOperatorAccess
AccessResult CheckMemberOperatorAccess(SourceLocation Loc, Expr *ObjectExpr, const SourceRange &, DeclAccessPair FoundDecl)
Definition: SemaAccess.cpp:1764
clang::Sema::checkUnsafeAssigns
bool checkUnsafeAssigns(SourceLocation Loc, QualType LHS, Expr *RHS)
checkUnsafeAssigns - Check whether +1 expr is being assigned to weak/__unsafe_unretained type.
Definition: SemaChecking.cpp:16308
MangleNumberingContext.h
clang::Sema::SubstExprs
bool SubstExprs(ArrayRef< Expr * > Exprs, bool IsCall, const MultiLevelTemplateArgumentList &TemplateArgs, SmallVectorImpl< Expr * > &Outputs)
Substitute the given template arguments into a list of expressions, expanding pack expansions if requ...
Definition: SemaTemplateInstantiate.cpp:3588
clang::Sema::NSAPIObj
std::unique_ptr< NSAPI > NSAPIObj
Caches identifiers/selectors for NSFoundation APIs.
Definition: Sema.h:1325
clang::Sema::CheckExceptionSpecCompatibility
bool CheckExceptionSpecCompatibility(Expr *From, QualType ToType)
Definition: SemaExceptionSpec.cpp:920
clang::EnterExpressionEvaluationContext::InitList
@ InitList
Definition: Sema.h:13818
clang::Sema::ActOnOpenMPTargetParallelForDirective
StmtResult ActOnOpenMPTargetParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp target parallel for' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:12611
clang::Sema::FinishTemplateArgumentDeduction
TemplateDeductionResult FinishTemplateArgumentDeduction(FunctionTemplateDecl *FunctionTemplate, SmallVectorImpl< DeducedTemplateArgument > &Deduced, unsigned NumExplicitlySpecified, FunctionDecl *&Specialization, sema::TemplateDeductionInfo &Info, SmallVectorImpl< OriginalCallArg > const *OriginalCallArgs=nullptr, bool PartialOverloading=false, llvm::function_ref< bool()> CheckNonDependent=[]{ return false;})
Finish template argument deduction for a function template, checking the deduced template arguments f...
Definition: SemaTemplateDeduction.cpp:3429
clang::Sema::ExtnameUndeclaredIdentifiers
llvm::DenseMap< IdentifierInfo *, AsmLabelAttr * > ExtnameUndeclaredIdentifiers
ExtnameUndeclaredIdentifiers - Identifiers contained in #pragma redefine_extname before declared.
Definition: Sema.h:1271
clang::Sema::ModuleDeclKind
ModuleDeclKind
Definition: Sema.h:3217
clang::Sema::ActOnCompoundLiteral
ExprResult ActOnCompoundLiteral(SourceLocation LParenLoc, ParsedType Ty, SourceLocation RParenLoc, Expr *InitExpr)
Definition: SemaExpr.cpp:7205
clang::Sema::getOwningModule
Module * getOwningModule(const Decl *Entity)
Get the module owning an entity.
Definition: Sema.h:2514
clang::Sema::ActOnPopScope
void ActOnPopScope(SourceLocation Loc, Scope *S)
Scope actions.
Definition: SemaDecl.cpp:2063
clang::Sema::ActOnOpenMPUnifiedSharedMemoryClause
OMPClause * ActOnOpenMPUnifiedSharedMemoryClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'unified_address' clause.
Definition: SemaOpenMP.cpp:16634
clang::Sema::BuildBlockForLambdaConversion
ExprResult BuildBlockForLambdaConversion(SourceLocation CurrentLocation, SourceLocation ConvLocation, CXXConversionDecl *Conv, Expr *Src)
Definition: SemaLambda.cpp:1978
clang::Sema::AllowedExplicit::Conversions
@ Conversions
Allow explicit conversion functions but not explicit constructors.
clang::Sema::NC_Error
@ NC_Error
Classification failed; an error has been produced.
Definition: Sema.h:2728
clang::Sema::CheckedConversionKind
CheckedConversionKind
The kind of conversion being performed.
Definition: Sema.h:11954
clang::Sema::mergeImportModuleAttr
WebAssemblyImportModuleAttr * mergeImportModuleAttr(Decl *D, const WebAssemblyImportModuleAttr &AL)
clang::Sema::CodeSynthesisContext::Kind
enum clang::Sema::CodeSynthesisContext::SynthesisKind Kind
clang::Sema::BuildTypeTrait
ExprResult BuildTypeTrait(TypeTrait Kind, SourceLocation KWLoc, ArrayRef< TypeSourceInfo * > Args, SourceLocation RParenLoc)
Definition: SemaExprCXX.cpp:5390
clang::Sema::PCC_Type
@ PCC_Type
Code completion occurs where only a type is permitted.
Definition: Sema.h:12991
clang::Sema::CheckPointerConversion
bool CheckPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess, bool Diagnose=true)
CheckPointerConversion - Check the pointer conversion from the expression From to the type ToType.
Definition: SemaOverload.cpp:3002
clang::Sema::ActOnNameClassifiedAsOverloadSet
ExprResult ActOnNameClassifiedAsOverloadSet(Scope *S, Expr *OverloadSet)
Act on the result of classifying a name as an overload set.
Definition: SemaDecl.cpp:1261
clang::Sema::DiagnoseUnusedExprResult
void DiagnoseUnusedExprResult(const Stmt *S, unsigned DiagID)
DiagnoseUnusedExprResult - If the statement passed in is an expression whose result is unused,...
Definition: SemaStmt.cpp:219
clang::Sema::ParseObjCStringLiteral
ExprResult ParseObjCStringLiteral(SourceLocation *AtLocs, ArrayRef< Expr * > Strings)
Definition: SemaExprObjC.cpp:35
clang::Sema::CodeCompleteObjCPropertySetter
void CodeCompleteObjCPropertySetter(Scope *S)
Definition: SemaCodeComplete.cpp:7499
clang::ASTContext::BoolTy
CanQualType BoolTy
Definition: ASTContext.h:1093
clang::Sema::DiagnoseConditionalForNull
bool DiagnoseConditionalForNull(Expr *LHSExpr, Expr *RHSExpr, SourceLocation QuestionLoc)
Emit a specialized diagnostic when one expression is a null pointer constant and the other is not a p...
Definition: SemaExpr.cpp:8079
clang::Sema::ActOnFinishSwitchStmt
StmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc, Stmt *Switch, Stmt *Body)
Definition: SemaStmt.cpp:1206
clang::Sema::isTemplateName
TemplateNameKind isTemplateName(Scope *S, CXXScopeSpec &SS, bool hasTemplateKeyword, const UnqualifiedId &Name, ParsedType ObjectType, bool EnteringContext, TemplateTy &Template, bool &MemberOfUnknownSpecialization, bool Disambiguation=false)
Definition: SemaTemplate.cpp:170
clang::Sema::BuildSYCLBuiltinNumFieldsExpr
ExprResult BuildSYCLBuiltinNumFieldsExpr(SourceLocation Loc, QualType SourceTy)
Definition: SemaSYCL.cpp:153
GCCTypeClass::None
@ None
clang::DeclRefExpr
A reference to a declared variable, function, enum, etc.
Definition: Expr.h:1223
clang::Sema::AbstractDiagSelID
AbstractDiagSelID
Definition: Sema.h:7799
clang::Sema::ActOnPureSpecifier
void ActOnPureSpecifier(Decl *D, SourceLocation PureSpecLoc)
Definition: SemaDeclCXX.cpp:17589
clang::NamespaceDecl
Represent a C++ namespace.
Definition: Decl.h:541
clang::Sema::getSyclIntegrationHeader
SYCLIntegrationHeader & getSyclIntegrationHeader()
Lazily creates and returns SYCL integration header instance.
Definition: Sema.h:13662
clang::Sema::NSNumberPointer
QualType NSNumberPointer
Pointer to NSNumber type (NSNumber *).
Definition: Sema.h:1334
clang::FunctionDecl
Represents a function declaration or definition.
Definition: Decl.h:1856
clang::Sema::Ref_Compatible
@ Ref_Compatible
Ref_Compatible - The two types are reference-compatible.
Definition: Sema.h:12398
clang::Sema::ComparisonCategoryUsage::DefaultedOperator
@ DefaultedOperator
A defaulted 'operator<=>' needed the comparison category.
clang::Sema::BuildCompoundLiteralExpr
ExprResult BuildCompoundLiteralExpr(SourceLocation LParenLoc, TypeSourceInfo *TInfo, SourceLocation RParenLoc, Expr *LiteralExpr)
Definition: SemaExpr.cpp:7219
clang::Sema::AddSYCLAddIRAttributesGlobalVariableAttr
void AddSYCLAddIRAttributesGlobalVariableAttr(Decl *D, const AttributeCommonInfo &CI, MutableArrayRef< Expr * > Args)
clang::Sema::prepareVectorSplat
ExprResult prepareVectorSplat(QualType VectorTy, Expr *SplattedExpr)
Prepare SplattedExpr for a vector splat operation, adding implicit casts if necessary.
Definition: SemaExpr.cpp:7827
clang::Sema::ExtParameterInfoBuilder::set
void set(unsigned index, FunctionProtoType::ExtParameterInfo info)
Set the ExtParameterInfo for the parameter at the given index,.
Definition: Sema.h:9705
clang::RecordDecl
Represents a struct/union/class.
Definition: Decl.h:3885
clang::Sema::ActOnOpenMPUseClause
OMPClause * ActOnOpenMPUseClause(Expr *InteropVar, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation VarLoc, SourceLocation EndLoc)
Called on well-formed 'use' clause.
Definition: SemaOpenMP.cpp:16807
clang::TemplateParameter
llvm::PointerUnion< TemplateTypeParmDecl *, NonTypeTemplateParmDecl *, TemplateTemplateParmDecl * > TemplateParameter
Stores a template parameter of any kind.
Definition: DeclTemplate.h:63
clang::Sema::ActOnFinishCXXMemberSpecification
void ActOnFinishCXXMemberSpecification(Scope *S, SourceLocation RLoc, Decl *TagDecl, SourceLocation LBrac, SourceLocation RBrac, const ParsedAttributesView &AttrList)
Definition: SemaDeclCXX.cpp:10119
clang::Sema::ActOnCXXTypeConstructExpr
ExprResult ActOnCXXTypeConstructExpr(ParsedType TypeRep, SourceLocation LParenOrBraceLoc, MultiExprArg Exprs, SourceLocation RParenOrBraceLoc, bool ListInitialization)
ActOnCXXTypeConstructExpr - Parse construction of a specified type.
Definition: SemaExprCXX.cpp:1419
clang::Sema::UndefinedButUsed
llvm::MapVector< NamedDecl *, SourceLocation > UndefinedButUsed
UndefinedInternals - all the used, undefined objects which require a definition in this translation u...
Definition: Sema.h:1618
clang::Sema::FullExprArg::operator->
Expr * operator->()
Definition: Sema.h:4973
clang::Sema::ImplicitExceptionSpecification::data
const QualType * data() const
The set of exceptions in the exception specification.
Definition: Sema.h:6270
clang::CallExpr
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2853
clang::Sema::HandleExprEvaluationContextForTypeof
ExprResult HandleExprEvaluationContextForTypeof(Expr *E)
Definition: SemaExpr.cpp:17376
clang::ObjCList< ObjCProtocolDecl >
clang::Sema::ActOnCXXUuidof
ExprResult ActOnCXXUuidof(SourceLocation OpLoc, SourceLocation LParenLoc, bool isType, void *TyOrExpr, SourceLocation RParenLoc)
ActOnCXXUuidof - Parse __uuidof( something ).
Definition: SemaExprCXX.cpp:780
clang::Sema::CheckConstraintExpression
bool CheckConstraintExpression(const Expr *CE, Token NextToken=Token(), bool *PossibleNonPrimary=nullptr, bool IsTrailingRequiresClause=false)
Check whether the given expression is a valid constraint expression.
Definition: SemaConcept.cpp:62
clang::Sema::NeedToCaptureVariable
bool NeedToCaptureVariable(VarDecl *Var, SourceLocation Loc)
Checks if the variable must be captured.
Definition: SemaExpr.cpp:18579
clang::Sema::OpaqueParser
void * OpaqueParser
Definition: Sema.h:1083
clang::Sema::CheckRedeclarationModuleOwnership
bool CheckRedeclarationModuleOwnership(NamedDecl *New, NamedDecl *Old)
We've determined that New is a redeclaration of Old.
Definition: SemaDecl.cpp:1599
clang::Sema::DelayedDiagnostics::add
void add(const sema::DelayedDiagnostic &diag)
Adds a delayed diagnostic.
Definition: DelayedDiagnostic.h:325
clang::Sema::CodeSynthesisContext::PriorTemplateArgumentSubstitution
@ PriorTemplateArgumentSubstitution
We are substituting prior template arguments into a new template parameter.
Definition: Sema.h:9081
clang::Sema::MergeSYCLIntelFPGAInitiationIntervalAttr
SYCLIntelFPGAInitiationIntervalAttr * MergeSYCLIntelFPGAInitiationIntervalAttr(Decl *D, const SYCLIntelFPGAInitiationIntervalAttr &A)
clang::Sema::ActOnStartOfFunctionDef
Decl * ActOnStartOfFunctionDef(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParamLists, SkipBodyInfo *SkipBody=nullptr)
Definition: SemaDecl.cpp:14239
StmtCXX.h
clang::Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs
bool isTemplateTemplateParameterAtLeastAsSpecializedAs(TemplateParameterList *PParam, TemplateDecl *AArg, SourceLocation Loc)
Definition: SemaTemplateDeduction.cpp:5508
clang::Sema::checkPseudoObjectIncDec
ExprResult checkPseudoObjectIncDec(Scope *S, SourceLocation OpLoc, UnaryOperatorKind Opcode, Expr *Op)
Check an increment or decrement of a pseudo-object expression.
Definition: SemaPseudoObject.cpp:1552
clang::Sema::MergeSYCLIntelESimdVectorizeAttr
SYCLIntelESimdVectorizeAttr * MergeSYCLIntelESimdVectorizeAttr(Decl *D, const SYCLIntelESimdVectorizeAttr &A)
clang::Sema::ActOnOpenMPThreadLimitClause
OMPClause * ActOnOpenMPThreadLimitClause(Expr *ThreadLimit, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'thread_limit' clause.
Definition: SemaOpenMP.cpp:21609
clang::Sema::CheckObjCMethodOverride
void CheckObjCMethodOverride(ObjCMethodDecl *NewMethod, const ObjCMethodDecl *Overridden)
Check whether the given new method is a valid override of the given overridden method,...
Definition: SemaDeclObjC.cpp:136
clang::Sema::CodeSynthesisContext::DefiningSynthesizedFunction
@ DefiningSynthesizedFunction
We are defining a synthesized function (such as a defaulted special member).
Definition: Sema.h:9111
clang::Sema::VtorDispStack
PragmaStack< MSVtorDispMode > VtorDispStack
Whether to insert vtordisps prior to virtual bases in the Microsoft C++ ABI.
Definition: Sema.h:857
SemaConcept.h
clang::Sema::ActOnTemplateDeclarator
Decl * ActOnTemplateDeclarator(Scope *S, MultiTemplateParamsArg TemplateParameterLists, Declarator &D)
Definition: SemaTemplate.cpp:8605
clang::Sema::hasVisibleMergedDefinition
bool hasVisibleMergedDefinition(NamedDecl *Def)
Definition: SemaLookup.cpp:1623
clang::Sema::CheckBooleanCondition
ExprResult CheckBooleanCondition(SourceLocation Loc, Expr *E, bool IsConstexpr=false)
CheckBooleanCondition - Diagnose problems involving the use of the given expression as a boolean cond...
Definition: SemaExpr.cpp:19602
clang::TypeConstraint
Definition: ASTConcept.h:167
clang::Sema::AtomicArgumentOrder::AST
@ AST
clang::Sema::ActOnObjCAtThrowStmt
StmtResult ActOnObjCAtThrowStmt(SourceLocation AtLoc, Expr *Throw, Scope *CurScope)
Definition: SemaStmt.cpp:4258
clang::Sema::OSMK_None
@ OSMK_None
Definition: Sema.h:10155
clang::Sema::CodeCompleteObjCClassPropertyRefExpr
void CodeCompleteObjCClassPropertyRefExpr(Scope *S, IdentifierInfo &ClassName, SourceLocation ClassNameLoc, bool IsBaseExprStatement)
Definition: SemaCodeComplete.cpp:5712
clang::Sema::PragmaAlignPackDiagnoseKind::ChangedStateAtExit
@ ChangedStateAtExit
clang::Sema::RebuildTypeInCurrentInstantiation
TypeSourceInfo * RebuildTypeInCurrentInstantiation(TypeSourceInfo *T, SourceLocation Loc, DeclarationName Name)
Rebuilds a type within the context of the current instantiation.
Definition: SemaTemplate.cpp:10822
clang::Sema::BuildSYCLIntelFPGALoopCoalesceAttr
SYCLIntelFPGALoopCoalesceAttr * BuildSYCLIntelFPGALoopCoalesceAttr(const AttributeCommonInfo &CI, Expr *E)
Definition: SemaStmtAttr.cpp:159
clang::Sema::CodeSynthesisContext::CodeSynthesisContext
CodeSynthesisContext()
Definition: Sema.h:9187
clang::Sema::PoppedFunctionScopeDeleter::operator()
void operator()(sema::FunctionScopeInfo *Scope) const
Definition: Sema.cpp:2317
clang::Sema::IdentifyCUDATarget
CUDAFunctionTarget IdentifyCUDATarget(const FunctionDecl *D, bool IgnoreImplicitHDAttr=false)
Determines whether the given function is a CUDA device/host/kernel/etc.
Definition: SemaCUDA.cpp:116
clang::Sema::CheckMemberPointerConversion
bool CheckMemberPointerConversion(Expr *From, QualType ToType, CastKind &Kind, CXXCastPath &BasePath, bool IgnoreBaseAccess)
CheckMemberPointerConversion - Check the member pointer conversion from the expression From to the ty...
Definition: SemaOverload.cpp:3130
clang::Sema::isDeductionGuideName
bool isDeductionGuideName(Scope *S, const IdentifierInfo &Name, SourceLocation NameLoc, ParsedTemplateTy *Template=nullptr)
Determine whether a particular identifier might be the name in a C++1z deduction-guide declaration.
Definition: SemaTemplate.cpp:312
clang::Sema::LK_Block
@ LK_Block
Definition: Sema.h:3969
clang::Sema::MMS_strict
@ MMS_strict
Definition: Sema.h:4833
clang::Sema::ActOnOpenMPSectionsDirective
StmtResult ActOnOpenMPSectionsDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp sections' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10058
clang::Sema::ActOnCallExpr
ExprResult ActOnCallExpr(Scope *S, Expr *Fn, SourceLocation LParenLoc, MultiExprArg ArgExprs, SourceLocation RParenLoc, Expr *ExecConfig=nullptr)
ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
Definition: SemaExpr.cpp:6621
clang::Sema::SpecialMemberCache
llvm::FoldingSet< SpecialMemberOverloadResultEntry > SpecialMemberCache
A cache of special member function overload resolution results for C++ records.
Definition: Sema.h:1580
clang::Sema::DiagnoseAssignmentAsCondition
void DiagnoseAssignmentAsCondition(Expr *E)
DiagnoseAssignmentAsCondition - Given that an expression is being used as a boolean condition,...
Definition: SemaExpr.cpp:19517
clang::Sema::TDK_Underqualified
@ TDK_Underqualified
Template argument deduction failed due to inconsistent cv-qualifiers on a template parameter type tha...
Definition: Sema.h:8828
clang::operator==
bool operator==(const CallGraphNode::CallRecord &LHS, const CallGraphNode::CallRecord &RHS)
Definition: CallGraph.h:223
clang::Sema::CodeSynthesisContext::DeductionInfo
sema::TemplateDeductionInfo * DeductionInfo
The template deduction info object associated with the substitution or checking of explicit or deduce...
Definition: Sema.h:9180
clang::FileNullability::SawTypeNullability
bool SawTypeNullability
Whether we saw any type nullability annotations in the given file.
Definition: Sema.h:259
clang::Sema::BuildVectorLiteral
ExprResult BuildVectorLiteral(SourceLocation LParenLoc, SourceLocation RParenLoc, Expr *E, TypeSourceInfo *TInfo)
Build an altivec or OpenCL literal.
Definition: SemaExpr.cpp:7968
clang::Sema::LK_None
@ LK_None
Definition: Sema.h:3970
clang::Sema::RequireCompleteExprType
bool RequireCompleteExprType(Expr *E, unsigned DiagID, const Ts &...Args)
Definition: Sema.h:2638
clang::Sema::POAK_Native
@ POAK_Native
Definition: Sema.h:10352
clang::Sema::setFunctionHasBranchProtectedScope
void setFunctionHasBranchProtectedScope()
Definition: Sema.cpp:2347
clang::Sema::getCompletedType
QualType getCompletedType(Expr *E)
Get the type of expression E, triggering instantiation to complete the type if necessary – that is,...
Definition: SemaType.cpp:8542
clang::Sema::ActOnStmtExprError
void ActOnStmtExprError()
Definition: SemaExpr.cpp:15575
clang::Sema::ProcessDeclAttributeDelayed
void ProcessDeclAttributeDelayed(Decl *D, const ParsedAttributesView &AttrList)
clang::Sema::OCK_Protocol
@ OCK_Protocol
Definition: Sema.h:9945
clang::Sema::AddReqdWorkGroupSizeAttr
void AddReqdWorkGroupSizeAttr(Decl *D, const AttributeCommonInfo &CI, Expr *XDim, Expr *YDim, Expr *ZDim)
clang::Sema::getReturnTypeLoc
TypeLoc getReturnTypeLoc(FunctionDecl *FD) const
Definition: SemaStmt.cpp:3753
clang::Sema::DefineDefaultedComparison
void DefineDefaultedComparison(SourceLocation Loc, FunctionDecl *FD, DefaultedComparisonKind DCK)
Definition: SemaDeclCXX.cpp:8785
clang::Sema::BuildStdInitializerList
QualType BuildStdInitializerList(QualType Element, SourceLocation Loc)
Looks for the std::initializer_list template and instantiates it with Element, or emits an error if i...
Definition: SemaDeclCXX.cpp:11554
clang::Sema::VAK_Undefined
@ VAK_Undefined
Definition: Sema.h:12041
clang::Sema::ActOnBlockStmtExpr
ExprResult ActOnBlockStmtExpr(SourceLocation CaretLoc, Stmt *Body, Scope *CurScope)
ActOnBlockStmtExpr - This is called when the body of a block statement literal was successfully compl...
Definition: SemaExpr.cpp:16038
clang::Sema::RequireStructuralType
bool RequireStructuralType(QualType T, SourceLocation Loc)
Require the given type to be a structural type, and diagnose if it is not.
Definition: SemaTemplate.cpp:1301
clang::Sema::BuildSYCLBuiltinBaseTypeExpr
ExprResult BuildSYCLBuiltinBaseTypeExpr(SourceLocation Loc, QualType SourceTy, Expr *Idx)
Definition: SemaSYCL.cpp:284
clang::CodeCompletionTUInfo
Definition: CodeCompleteConsumer.h:648
clang::Sema::CodeSynthesisContext::MarkingClassDllexported
@ MarkingClassDllexported
We are marking a class as __dllexport.
Definition: Sema.h:9136
clang::Sema::CheckLiteralOperatorDeclaration
bool CheckLiteralOperatorDeclaration(FunctionDecl *FnDecl)
CheckLiteralOperatorDeclaration - Check whether the declaration of this literal operator function is ...
Definition: SemaDeclCXX.cpp:16104
clang::Sema::CodeCompleteObjCMessageReceiver
void CodeCompleteObjCMessageReceiver(Scope *S)
Definition: SemaCodeComplete.cpp:7791
clang::Sema::PrepareCastToObjCObjectPointer
CastKind PrepareCastToObjCObjectPointer(ExprResult &E)
Prepare a conversion of the given expression to an ObjC object pointer type.
Definition: SemaExpr.cpp:7440
clang::Sema::ActOnOpenMPReleaseClause
OMPClause * ActOnOpenMPReleaseClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'release' clause.
Definition: SemaOpenMP.cpp:16604
clang::Sema::LateInstantiatedAttribute::LateInstantiatedAttribute
LateInstantiatedAttribute(const Attr *A, LocalInstantiationScope *S, Decl *D)
Definition: Sema.h:9833
clang::Sema::CodeCompleteObjCPropertyFlags
void CodeCompleteObjCPropertyFlags(Scope *S, ObjCDeclSpec &ODS)
Definition: SemaCodeComplete.cpp:7244
clang::Sema::SubstBaseSpecifiers
bool SubstBaseSpecifiers(CXXRecordDecl *Instantiation, CXXRecordDecl *Pattern, const MultiLevelTemplateArgumentList &TemplateArgs)
Perform substitution on the base class specifiers of the given class template specialization.
Definition: SemaTemplateInstantiate.cpp:2574
clang::Sema::ActOnFinishRequiresExpr
void ActOnFinishRequiresExpr()
Definition: SemaExprCXX.cpp:8953
clang::Sema::TypeTy
OpaquePtr< QualType > TypeTy
Definition: Sema.h:580
clang::Sema::ActOnParamDeclarator
Decl * ActOnParamDeclarator(Scope *S, Declarator &D)
ActOnParamDeclarator - Called from Parser::ParseFunctionDeclarator() to introduce parameters into fun...
Definition: SemaDecl.cpp:13952
clang::DeclSpec
Captures information about "declaration specifiers".
Definition: DeclSpec.h:229
clang::Sema::FillInlineAsmIdentifierInfo
void FillInlineAsmIdentifierInfo(Expr *Res, llvm::InlineAsmIdentifierInfo &Info)
Definition: SemaStmtAsm.cpp:742
clang::Sema::ActOnOpenMPSizesClause
OMPClause * ActOnOpenMPSizesClause(ArrayRef< Expr * > SizeExprs, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-form 'sizes' clause.
Definition: SemaOpenMP.cpp:16120
clang::Sema::NumSFINAEErrors
unsigned NumSFINAEErrors
The number of SFINAE diagnostics that have been trapped.
Definition: Sema.h:1598
clang::Sema::getTemplateArgumentBindingsText
std::string getTemplateArgumentBindingsText(const TemplateParameterList *Params, const TemplateArgumentList &Args)
Produces a formatted string that describes the binding of template parameters to template arguments.
Definition: SemaTemplate.cpp:10905
clang::Sema::ActOnModuleBegin
void ActOnModuleBegin(SourceLocation DirectiveLoc, Module *Mod)
The parsed has entered a submodule.
Definition: SemaModule.cpp:594
clang::Sema::PragmaStack::SentinelAction
void SentinelAction(PragmaMsStackAction Action, StringRef Label)
Definition: Sema.h:829
clang::Sema::CodeCompleteAfterIf
void CodeCompleteAfterIf(Scope *S, bool IsBracedThen)
Definition: SemaCodeComplete.cpp:6389
clang::Sema::ReferenceConversionsScope
Definition: Sema.h:12402
clang::Sema::ActOnOpenMPParallelMasterDirective
StmtResult ActOnOpenMPParallelMasterDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed '#pragma omp parallel master' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10623
clang::Sema::PoppedFunctionScopePtr
std::unique_ptr< sema::FunctionScopeInfo, PoppedFunctionScopeDeleter > PoppedFunctionScopePtr
Definition: Sema.h:2156
clang::Sema::CheckCUDACall
bool CheckCUDACall(SourceLocation Loc, FunctionDecl *Callee)
Check whether we're allowed to call Callee from the current context.
Definition: SemaCUDA.cpp:789
clang::Sema::FunctionEmissionStatus::OMPDiscarded
@ OMPDiscarded
clang::Sema::UPPC_DataMemberType
@ UPPC_DataMemberType
The type of a data member.
Definition: Sema.h:8450
clang::Sema::PushParsingDeclaration
ParsingDeclState PushParsingDeclaration(sema::DelayedDiagnosticPool &pool)
Definition: Sema.h:5304
clang::Sema::WeakTopLevelDecl
SmallVector< Decl *, 2 > WeakTopLevelDecl
WeakTopLevelDecl - Translation-unit scoped declarations generated by #pragma weak during processing o...
Definition: Sema.h:1282
clang::Sema::DeviceDiagnosticReason::Sycl
@ Sycl
SYCL specific diagnostic.
clang::Sema::UPPC_UsingDeclaration
@ UPPC_UsingDeclaration
A using declaration.
Definition: Sema.h:8465
clang::Sema::BuildCXXThisExpr
Expr * BuildCXXThisExpr(SourceLocation Loc, QualType Type, bool IsImplicit)
Build a CXXThisExpr and mark it referenced in the current context.
Definition: SemaExprCXX.cpp:1391
clang::Sema::AdjustDestructorExceptionSpec
void AdjustDestructorExceptionSpec(CXXDestructorDecl *Destructor)
Build an exception spec for destructors that don't have one.
Definition: SemaDeclCXX.cpp:13866
clang::Sema::MergeSYCLAddIRAttributesGlobalVariableAttr
SYCLAddIRAttributesGlobalVariableAttr * MergeSYCLAddIRAttributesGlobalVariableAttr(Decl *D, const SYCLAddIRAttributesGlobalVariableAttr &A)
clang::Sema::ActOnBaseSpecifier
BaseResult ActOnBaseSpecifier(Decl *classdecl, SourceRange SpecifierRange, const ParsedAttributesView &Attrs, bool Virtual, AccessSpecifier Access, ParsedType basetype, SourceLocation BaseLoc, SourceLocation EllipsisLoc)
ActOnBaseSpecifier - Parsed a base specifier.
Definition: SemaDeclCXX.cpp:2644
clang::Sema::CheckARCMethodDecl
bool CheckARCMethodDecl(ObjCMethodDecl *method)
Check a method declaration for compatibility with the Objective-C ARC conventions.
Definition: SemaDeclObjC.cpp:225
clang::Sema::TypeDiagnoser::~TypeDiagnoser
virtual ~TypeDiagnoser()
Definition: Sema.h:2374
clang::Sema::BuildUnaryTransformType
QualType BuildUnaryTransformType(QualType BaseType, UnaryTransformType::UTTKind UKind, SourceLocation Loc)
Definition: SemaType.cpp:9171
clang::Sema::CheckBaseClassAccess
AccessResult CheckBaseClassAccess(SourceLocation AccessLoc, QualType Base, QualType Derived, const CXXBasePath &Path, unsigned DiagID, bool ForceCheck=false, bool ForceUnprivileged=false)
Checks access for a hierarchy conversion.
Definition: SemaAccess.cpp:1861
clang::Sema::MergeSYCLIntelLoopFuseAttr
SYCLIntelLoopFuseAttr * MergeSYCLIntelLoopFuseAttr(Decl *D, const SYCLIntelLoopFuseAttr &A)
clang::ADLResult
A class for storing results from argument-dependent lookup.
Definition: Lookup.h:797
clang::Sema::InstantiatingTemplate::ExceptionSpecification
Definition: Sema.h:9318
clang::Sema::deduceVarTypeFromInitializer
QualType deduceVarTypeFromInitializer(VarDecl *VDecl, DeclarationName Name, QualType Type, TypeSourceInfo *TSI, SourceRange Range, bool DirectInit, Expr *Init)
Definition: SemaDecl.cpp:11925
clang::prec::Spaceship
@ Spaceship
Definition: OperatorPrecedence.h:38
clang::Sema::NTCUC_BlockCapture
@ NTCUC_BlockCapture
Definition: Sema.h:3104
TypeLoc.h
clang::Sema::ExpressionEvaluationContextRecord::ReferenceToConsteval
llvm::SmallPtrSet< DeclRefExpr *, 4 > ReferenceToConsteval
Set of DeclRefExprs referencing a consteval function when used in a context not already known to be i...
Definition: Sema.h:1478
clang::Sema::InstantiateClassMembers
void InstantiateClassMembers(SourceLocation PointOfInstantiation, CXXRecordDecl *Instantiation, const MultiLevelTemplateArgumentList &TemplateArgs, TemplateSpecializationKind TSK)
Instantiates the definitions of all of the member of the given class, which is an instantiation of a ...
Definition: SemaTemplateInstantiate.cpp:3300
clang::Sema::IsPointerConversion
bool IsPointerConversion(Expr *From, QualType FromType, QualType ToType, bool InOverloadResolution, QualType &ConvertedType, bool &IncompatibleObjC)
IsPointerConversion - Determines whether the conversion of the expression From, which has the (possib...
Definition: SemaOverload.cpp:2369
clang::Sema::getPrintable
static int getPrintable(int I)
Definition: Sema.h:2377
clang::Sema::FPFeaturesStateRAII
Records and restores the CurFPFeatures state on entry/exit of compound statements.
Definition: Sema.h:1729
clang::Sema::OSMK_Copy
@ OSMK_Copy
Definition: Sema.h:10158
clang::Sema::CodeCompleteObjCInterfaceCategory
void CodeCompleteObjCInterfaceCategory(Scope *S, IdentifierInfo *ClassName, SourceLocation ClassNameLoc)
Definition: SemaCodeComplete.cpp:8407
clang::Sema::makeUnavailableInSystemHeader
bool makeUnavailableInSystemHeader(SourceLocation loc, UnavailableAttr::ImplicitReason reason)
makeUnavailableInSystemHeader - There is an error in the current context.
Definition: Sema.cpp:554
clang::Sema::ActOnOpenMPParallelForDirective
StmtResult ActOnOpenMPParallelForDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp parallel for' after parsing of the associated statement.
Definition: SemaOpenMP.cpp:10535
clang::SYCLIntegrationHeader::kind_pointer
@ kind_pointer
Definition: Sema.h:319
clang::Sema::LookupMethodInObjectType
ObjCMethodDecl * LookupMethodInObjectType(Selector Sel, QualType Ty, bool IsInstance)
LookupMethodInType - Look up a method in an ObjCObjectType.
Definition: SemaExprObjC.cpp:1936
clang::Sema::checkThisInStaticMemberFunctionExceptionSpec
bool checkThisInStaticMemberFunctionExceptionSpec(CXXMethodDecl *Method)
Whether this' shows up in the exception specification of a static member function.
Definition: SemaDeclCXX.cpp:18075
clang::Sema::DelayedDiagnostics
class clang::Sema::DelayedDiagnostics DelayedDiagnostics
clang::Sema::ExpressionEvaluationContext::ImmediateFunctionContext
@ ImmediateFunctionContext
In addition of being constant evaluated, the current expression occurs in an immediate function conte...
clang::Sema::MethodMatchStrategy
MethodMatchStrategy
Definition: Sema.h:4831
clang::Sema::ActOnPragmaFPReassociate
void ActOnPragmaFPReassociate(SourceLocation Loc, bool IsEnabled)
Called on well formed #pragma clang fp reassociate.
Definition: SemaAttr.cpp:1155
clang::Sema::CCK_ForBuiltinOverloadedOp
@ CCK_ForBuiltinOverloadedOp
A conversion for an operand of a builtin overloaded operator.
Definition: Sema.h:11964
clang::Sema::ArgumentPackSubstitutionIndexRAII::ArgumentPackSubstitutionIndexRAII
ArgumentPackSubstitutionIndexRAII(Sema &Self, int NewSubstitutionIndex)
Definition: Sema.h:9278
clang::Sema::getNamedReturnInfo
NamedReturnInfo getNamedReturnInfo(Expr *&E, SimplerImplicitMoveMode Mode=SimplerImplicitMoveMode::Normal)
Determine whether the given expression might be move-eligible or copy-elidable in either a (co_)retur...
Definition: SemaStmt.cpp:3355
clang::Sema::InstantiatingTemplate::Clear
void Clear()
Note that we have finished instantiating this template.
Definition: SemaTemplateInstantiate.cpp:468
clang::Sema::CheckTemplatePartialSpecializationArgs
bool CheckTemplatePartialSpecializationArgs(SourceLocation Loc, TemplateDecl *PrimaryTemplate, unsigned NumExplicitArgs, ArrayRef< TemplateArgument > Args)
Check the non-type template arguments of a class template partial specialization according to C++ [te...
Definition: SemaTemplate.cpp:8208
clang::VirtSpecifiers
Represents a C++11 virt-specifier-seq.
Definition: DeclSpec.h:2615
clang::Sema::BoundTypeDiagnoser::Args
std::tuple< const Ts &... > Args
Definition: Sema.h:2396
clang::Sema::ParsedFreeStandingDeclSpec
Decl * ParsedFreeStandingDeclSpec(Scope *S, AccessSpecifier AS, DeclSpec &DS, RecordDecl *&AnonRecord)
ParsedFreeStandingDeclSpec - This method is invoked when a declspec with no declarator (e....
Definition: SemaDecl.cpp:4568
clang::Sema::getCurCompoundScope
sema::CompoundScopeInfo & getCurCompoundScope() const
Definition: SemaStmt.cpp:405
clang::Sema::ActOnOpenMPSharedClause
OMPClause * ActOnOpenMPSharedClause(ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'shared' clause.
Definition: SemaOpenMP.cpp:17718
clang::CXXMethodDecl
Represents a static or instance method of a struct/union/class.
Definition: DeclCXX.h:1968
clang::Sema::NestedNameSpecInfo::NestedNameSpecInfo
NestedNameSpecInfo(IdentifierInfo *II, SourceLocation IdLoc, SourceLocation ColonColonLoc, ParsedType ObjectType=ParsedType())
Creates info object for the most typical case.
Definition: Sema.h:6894
clang::Sema::ActOnGenericSelectionExpr
ExprResult ActOnGenericSelectionExpr(SourceLocation KeyLoc, SourceLocation DefaultLoc, SourceLocation RParenLoc, Expr *ControllingExpr, ArrayRef< ParsedType > ArgTypes, ArrayRef< Expr * > ArgExprs)
Definition: SemaExpr.cpp:1651
clang::UnaryExprOrTypeTrait
UnaryExprOrTypeTrait
Names for the "expression or type" traits.
Definition: TypeTraits.h:51
clang::Sema::getDefaultedComparisonKind
DefaultedComparisonKind getDefaultedComparisonKind(const FunctionDecl *FD)
Definition: Sema.h:3490
clang::Sema::checkRetainCycles
void checkRetainCycles(ObjCMessageExpr *msg)
checkRetainCycles - Check whether an Objective-C message send might create an obvious retain cycle.
Definition: SemaChecking.cpp:16212
clang::Sema::TPL_TemplateTemplateParmMatch
@ TPL_TemplateTemplateParmMatch
We are matching the template parameter lists of two template template parameters as part of matching ...
Definition: Sema.h:8285
clang::Sema::CallingConventionIgnoredReason::VariadicFunction
@ VariadicFunction
clang::Sema::CheckDeductionGuideTemplate
void CheckDeductionGuideTemplate(FunctionTemplateDecl *TD)
Definition: SemaTemplate.cpp:4268
clang::Sema::ActOnPragmaAttributeAttribute
void ActOnPragmaAttributeAttribute(ParsedAttr &Attribute, SourceLocation PragmaLoc, attr::ParsedSubjectMatchRuleSet Rules)
Definition: SemaAttr.cpp:838
clang::Sema::ActOnFinishInlineFunctionDef
void ActOnFinishInlineFunctionDef(FunctionDecl *D)
Definition: SemaDecl.cpp:14268
clang::Sema::ActOnOpenMPTeamsDistributeParallelForSimdDirective
StmtResult ActOnOpenMPTeamsDistributeParallelForSimdDirective(ArrayRef< OMPClause * > Clauses, Stmt *AStmt, SourceLocation StartLoc, SourceLocation EndLoc, VarsWithInheritedDSAType &VarsWithImplicitDSA)
Called on well-formed '#pragma omp teams distribute parallel for simd' after parsing of the associate...
Definition: SemaOpenMP.cpp:13623
clang::Sema::LookupDefaultConstructor
CXXConstructorDecl * LookupDefaultConstructor(CXXRecordDecl *Class)
Look up the default constructor for the given class.
Definition: SemaLookup.cpp:3348
clang::ImplicitConversionSequence
ImplicitConversionSequence - Represents an implicit conversion sequence, which may be a standard conv...
Definition: Overload.h:518
clang::Sema::actOnObjCTypeArgsOrProtocolQualifiers
void actOnObjCTypeArgsOrProtocolQualifiers(Scope *S, ParsedType baseType, SourceLocation lAngleLoc, ArrayRef< IdentifierInfo * > identifiers, ArrayRef< SourceLocation > identifierLocs, SourceLocation rAngleLoc, SourceLocation &typeArgsLAngleLoc, SmallVectorImpl< ParsedType > &typeArgs, SourceLocation &typeArgsRAngleLoc, SourceLocation &protocolLAngleLoc, SmallVectorImpl< Decl * > &protocols, SourceLocation &protocolRAngleLoc, bool warnOnIncompleteProtocols)
Given a list of identifiers (and their locations), resolve the names to either Objective-C protocol q...
Definition: SemaDeclObjC.cpp:1410
clang::TypeSpecifierType
TypeSpecifierType
Specifies the kind of type.
Definition: Specifiers.h:52
clang::Sema::FlagBitsCache
llvm::DenseMap< const EnumDecl *, llvm::APInt > FlagBitsCache
A cache of the flags available in enumerations with the flag_bits attribute.
Definition: Sema.h:1584
clang::Sema::DeclareTargetContextInfo::MapInfo::Loc
SourceLocation Loc
Definition: Sema.h:10775
clang::Sema::SubstParmVarDecl
ParmVarDecl * SubstParmVarDecl(ParmVarDecl *D, const MultiLevelTemplateArgumentList &TemplateArgs, int indexAdjustment, Optional< unsigned > NumExpansions, bool ExpectParameterPack)
Definition: SemaTemplateInstantiate.cpp:2413
clang::Sema::clearDelayedTypo
void clearDelayedTypo(TypoExpr *TE)
Clears the state of the given TypoExpr.
Definition: SemaLookup.cpp:5596
clang::Sema::CorrectDelayedTyposInExpr
ExprResult CorrectDelayedTyposInExpr(Expr *E, VarDecl *InitDecl=nullptr, bool RecoverUncorrectedTypos=false, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult { return E;})
Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and r...
Definition: SemaExprCXX.cpp:8573
clang::Sema::getASTConsumer
ASTConsumer & getASTConsumer() const
Definition: Sema.h:1782
clang::PreferredTypeBuilder::enterReturn
void enterReturn(Sema &S, SourceLocation Tok)
Definition: SemaCodeComplete.cpp:386
clang::Sema::DelayedEquivalentExceptionSpecChecks
SmallVector< std::pair< FunctionDecl *, FunctionDecl * >, 2 > DelayedEquivalentExceptionSpecChecks
All the function redeclarations seen during a class definition that had their exception spec checks d...
Definition: Sema.h:1071
clang::SYCLIntegrationHeader::kind_std_layout
@ kind_std_layout
Definition: Sema.h:317
clang::Sema::BuildUsingDeclaration
NamedDecl * BuildUsingDeclaration(Scope *S, AccessSpecifier AS, SourceLocation UsingLoc, bool HasTypenameKeyword, SourceLocation TypenameLoc, CXXScopeSpec &SS, DeclarationNameInfo NameInfo, SourceLocation EllipsisLoc, const ParsedAttributesView &AttrList, bool IsInstantiation, bool IsUsingIfExists)
Builds a using declaration.
Definition: SemaDeclCXX.cpp:12284
clang::Sema::ActOnOpenMPRegionStart
void ActOnOpenMPRegionStart(OpenMPDirectiveKind DKind, Scope *CurScope)
Initialization of captured region for OpenMP region.
Definition: SemaOpenMP.cpp:3933
clang::Sema::checkObjCBridgeRelatedComponents
bool checkObjCBridgeRelatedComponents(SourceLocation Loc, QualType DestType, QualType SrcType, ObjCInterfaceDecl *&RelatedClass, ObjCMethodDecl *&ClassMethod, ObjCMethodDecl *&InstanceMethod, TypedefNameDecl *&TDNDecl, bool CfToNs, bool Diagnose=true)
Definition: SemaExprObjC.cpp:4225
clang::Sema::ExpressionEvaluationContext::PotentiallyEvaluated
@ PotentiallyEvaluated
The current expression is potentially evaluated at run time, which means that code may be generated t...
clang::Sema::ActOnOpenMPNowaitClause
OMPClause * ActOnOpenMPNowaitClause(SourceLocation StartLoc, SourceLocation EndLoc)
Called on well-formed 'nowait' clause.
Definition: SemaOpenMP.cpp:16547
clang::Sema::CheckSwitchCondition
ExprResult CheckSwitchCondition(SourceLocation SwitchLoc, Expr *Cond)
Definition: SemaStmt.cpp:1018
clang::Sema::AddArgumentDependentLookupCandidates
void AddArgumentDependentLookupCandidates(DeclarationName Name, SourceLocation Loc, ArrayRef< Expr * > Args, TemplateArgumentListInfo *ExplicitTemplateArgs, OverloadCandidateSet &CandidateSet, bool PartialOverloading=false)
Add function candidates found via argument-dependent lookup to the set of overloading candidates.
Definition: SemaOverload.cpp:9392
clang::Sema::CheckStructuredBindingMemberAccess
AccessResult CheckStructuredBindingMemberAccess(SourceLocation UseLoc, CXXRecordDecl *DecomposedClass, DeclAccessPair Field)
Checks implicit access to a member in a structured binding.
Definition: SemaAccess.cpp:1750
clang::Sema::ActOnOpenMPAllocateClause
OMPClause * ActOnOpenMPAllocateClause(Expr *Allocator, ArrayRef< Expr * > VarList, SourceLocation StartLoc, SourceLocation ColonLoc, SourceLocation LParenLoc, SourceLocation EndLoc)
Called on well-formed 'allocate' clause.
Definition: SemaOpenMP.cpp:22431
clang::Sema::areMatrixTypesOfTheSameDimension
bool areMatrixTypesOfTheSameDimension(QualType srcTy, QualType destTy)
Are the two types matrix types and do they have the same dimensions i.e.
Definition: SemaExpr.cpp:7705
clang::ExpressionTrait
ExpressionTrait
Definition: ExpressionTraits.h:21
clang::StorageClass
StorageClass
Storage classes.
Definition: Specifiers.h:233
clang::Sema::NTK_NonStruct
@ NTK_NonStruct
Definition: Sema.h:3356
clang::Sema::ActOnEmptyDeclaration
Decl * ActOnEmptyDeclaration(Scope *S, const ParsedAttributesView &AttrList, SourceLocation SemiLoc)
Handle a C++11 empty-declaration and attribute-declaration.
Definition: SemaDeclCXX.cpp:16349
clang::Sema::PragmaAttributeGroup::Loc
SourceLocation Loc
The location of the push attribute.
Definition: Sema.h:918